tor_multipath_voip/scripts/understand_tor.py

16 lines
341 B
Python
Raw Normal View History

2020-01-20 17:42:15 +00:00
#!/usr/bin/python3
import sys,re
print('authenticate ""')
input()
print('setevents circ')
input()
with open('better_logs.txt', 'w') as f:
for line in sys.stdin:
r = re.search(r'650 CIRC (\d+) (\S+) \S+ BUILD_FLAGS=\S+ PURPOSE=(\S+) HS_STATE=(\S+) TIME_CREATED=(\S+) (REASON=(\S+))?
', line)
if not r: continue
f.write("\n")