Refreshed Tor node list

This commit is contained in:
Luca Deri 2019-09-08 21:42:33 +02:00
parent a0a8149833
commit d457b07f9f
9 changed files with 43 additions and 23 deletions

14
utils/toripaddr2list.py Executable file
View file

@ -0,0 +1,14 @@
#!/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):
ipaddr = line.rstrip()
print(" { 0x"+socket.inet_aton(ipaddr).hex()+", /* "+ipaddr+" */, 32, NDPI_PROTOCOL_TOR },")