Various improvements in particular for CapWAP and Bloomberg

This commit is contained in:
Luca Deri
2019-10-27 23:05:24 +01:00
parent fd38b752c4
commit ecdb7cdc55
4 changed files with 34 additions and 8 deletions
+8 -2
View File
@@ -9,6 +9,12 @@ if len (sys.argv) != 2 :
with open(sys.argv[1]) as fp:
for cnt, line in enumerate(fp):
ipaddr = line.rstrip()
print(" { 0x"+socket.inet_aton(ipaddr).hex()+", /* "+ipaddr+" */, 32, NDPI_PROTOCOL_TOR },")
x = line.rstrip().split("/")
ipaddr = x[0]
cidr = x[1]
if(cidr == None):
cidr = "32"
print(" { 0x"+socket.inet_aton(ipaddr).hex().upper()+" /* "+ipaddr+"/"+cidr+" */, "+cidr+", NDPI_PROTOCOL_XYX },")