tor_multipath_voip/scripts/understand_tor.py
2020-01-20 18:42:15 +01:00

15 lines
341 B
Python

#!/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")