mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-05-01 00:19:42 +00:00
Refreshed Tor node list
This commit is contained in:
parent
a0a8149833
commit
d457b07f9f
9 changed files with 43 additions and 23 deletions
14
utils/toripaddr2list.py
Executable file
14
utils/toripaddr2list.py
Executable 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 },")
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue