aboutsummaryrefslogtreecommitdiff
path: root/utils/toripaddr2list.py
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2021-12-19 18:59:45 +0100
committerLuca Deri <deri@ntop.org>2021-12-19 18:59:45 +0100
commit7aad97fffbdd37f206a4164d6b61945b03dfbbc2 (patch)
tree18acecc6b03b727ace21ee8183a45ccd409141f9 /utils/toripaddr2list.py
parent7153b8933ca6a3df3f6de7d47cbb25e66a8970d4 (diff)
Added Microsoft Azure support
Diffstat (limited to 'utils/toripaddr2list.py')
-rwxr-xr-xutils/toripaddr2list.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/utils/toripaddr2list.py b/utils/toripaddr2list.py
deleted file mode 100755
index 0257e4098..000000000
--- a/utils/toripaddr2list.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python3
-
-import sys
-import socket, struct
-
-if len (sys.argv) != 2 :
- print("Usage: toripaddr2list.py <file>")
- sys.exit (1)
-
-with open(sys.argv[1]) as fp:
- for cnt, line in enumerate(fp):
- line = line.rstrip()
-
- if(line != ""):
- x = line.split("/")
-
- if(len(x) == 2):
- ipaddr = x[0]
- cidr = x[1]
- else:
- ipaddr = line
- cidr = "32"
-
- if(ipaddr != ""):
- print(" { 0x"+socket.inet_aton(ipaddr).hex().upper()+" /* "+ipaddr+"/"+cidr+" */, "+cidr+", NDPI_PROTOCOL_XYX },")
-