Add/fix shebang in python scripts, add execute permission (linux), remove whitespace/tabs at end of line
This commit is contained in:
5
tools/parse_lookup_log.py
Normal file → Executable file
5
tools/parse_lookup_log.py
Normal file → Executable file
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
# this is meant to parse the dht_lookups.log generated by parse_dht_log.py
|
||||
|
||||
import os
|
||||
@@ -82,14 +83,14 @@ for l in f:
|
||||
dst = '0.0.0.0'
|
||||
if not dst in nodes:
|
||||
nodes[dst] = { 'conns': set(), 'p': p, 'c': 'blue', 's': 'circle'}
|
||||
|
||||
|
||||
p = calculate_pos(l[2], 25)
|
||||
dst = '255.255.255.255'
|
||||
if not dst in nodes:
|
||||
nodes[dst] = { 'conns': set(), 'p': p, 'c': 'yellow', 's': 'circle'}
|
||||
elif kind == '->':
|
||||
dst = l[3]
|
||||
|
||||
|
||||
if not dst in nodes:
|
||||
src = get_origin(dst)
|
||||
p = calculate_pos(l[2], int(l[1]))
|
||||
|
Reference in New Issue
Block a user