Commit 2eb849ad authored by Simon Janos's avatar Simon Janos
Browse files

tisztázás, appróbb javítás, további tesztek

parent 7a502834
#!/bin/python3
import argparse, csv, subprocess, re
from lxml import etree
import xml.etree.ElementTree as xml
parser = argparse.ArgumentParser()
......@@ -49,7 +48,6 @@ for row in machines:
if Gateway == "0.0.0.0" or Gateway == "::":
Gateway = "On-link"
Metric = a.findall(dialect + "RouteMetric")[0].text
#print([IfIndex, DstPrefix, Gateway, Metric])
with open(outfile, 'a') as output:
writer = csv.writer(output, delimiter=',')
......@@ -60,13 +58,4 @@ for row in machines:
except FileNotFoundError:
print("Cannot write output file, directory does not exist or not writable.")
#et = etree.XML(rt.encode('utf-8'))
#print(root.findall("p:Win32_IP4RouteTable"))
# for line in p.stdout.readlines():
# print(line)
# print(p.stdout.readlines())
# retval = p.wait()
#spamWriter = csv.writer(open('eggs.csv', 'w', newline=''), delimiter=' ', quotechar='|', quoting=csv.QUOTE_MINIMAL)
exit(1)
10.6.17.12,5985,75736,RdBF4nnX
10.6.17.12,5985,75736,588jFiFG
10.6.17.141,5985,75736,vCSmdG5v
10.6.17.142,5985,valami,akarmi
10.6.17.143,5985,valami,akarmi
ERROR: could not connect to 10.6.17.141
ERROR: could not connect to 10.6.17.142
ERROR: could not connect to 10.6.17.143
#!/bin/bash -x
/usr/bin/python3 ../src/getRouteRules.py -m test1/machines.csv -o test1 > test1/test.out
/usr/bin/python3 ../src/getRouteRules.py -m machines.csv -o test1 > test1/test.out
10.6.17.12,5985,75736,RdBF4nnX
10.6.17.141,5985,75736,vCSmdG5v
10.6.17.142,5985,valami,akarmi
10.6.17.143,5985,valami,akarmi
ERROR: could not connect to 10.6.17.141
ERROR: could not connect to 10.6.17.142
ERROR: could not connect to 10.6.17.143
#!/bin/bash -x
/usr/bin/python3 ../src/getRouteRules.py -m test2/machines.csv -o test2 -i 1 > test2/test.out
/usr/bin/python3 ../src/getRouteRules.py -m machines.csv -o test2 -i 1 > test2/test.out
10.6.17.12,5985,75736,RdBF4nnX
10.6.17.141,5985,75736,vCSmdG5v
10.6.17.142,5985,valami,akarmi
10.6.17.143,5985,valami,akarmi
ERROR: could not connect to 10.6.17.141
ERROR: could not connect to 10.6.17.142
ERROR: could not connect to 10.6.17.143
#!/bin/bash -x
/usr/bin/python3 ../src/getRouteRules.py -m test3/machines.csv -o test3 -a IPv6 > test3/test.out
/usr/bin/python3 ../src/getRouteRules.py -m machines.csv -o test3 -a IPv6 > test3/test.out
10.6.17.12,5985,75736,RdBF4nnX
10.6.17.141,5985,75736,vCSmdG5v
10.6.17.142,5985,valami,akarmi
10.6.17.143,5985,valami,akarmi
ERROR: could not connect to 10.6.17.141
ERROR: could not connect to 10.6.17.142
ERROR: could not connect to 10.6.17.143
#!/bin/bash -x
/usr/bin/python3 ../src/getRouteRules.py -m test4/machines.csv -o test4 -a IPv4 -i 1 > test4/test.out
/usr/bin/python3 ../src/getRouteRules.py -m machines.csv -o test4 -a IPv4 -i 1 > test4/test.out
#!/bin/bash -x
/usr/bin/python3 ../src/getRouteRules.py -m machines.csv > test5/test.out
Cannot write output file, directory does not exist or not writable.
#!/bin/bash -x
/usr/bin/python3 ../src/getRouteRules.py -m machines.csv -o nemletezik > test6/test.out
#!/bin/bash -x
/usr/bin/python3 ../src/getRouteRules.py -o test7 > test7/test.out
Cannot open input file (nemletezik.csv)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment