From e0f19baf695ad82f4b0a3d59160b71f8fa5daadc Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 20 Jan 2020 18:42:15 +0100 Subject: [PATCH] understand tor --- scripts/understand_tor.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scripts/understand_tor.py diff --git a/scripts/understand_tor.py b/scripts/understand_tor.py new file mode 100644 index 0000000..cbaea7a --- /dev/null +++ b/scripts/understand_tor.py @@ -0,0 +1,15 @@ +#!/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")