Skip to content

Commit cfe1922

Browse files
committed
update net-tree visualization script
1 parent 1675eac commit cfe1922

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

visualization/net_tree.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ def main():
3030
with open(args.file_net, 'r', encoding='utf-8') as f:
3131
raw = json_loads(f.read())
3232

33-
sorted_nets = dict(sorted(raw.items(), key=lambda item: item[1]['all'], reverse=True))
33+
# sort by 'all' (max reports) or 'reported_ips' (worst reputation)
34+
sorted_nets = dict(sorted(raw.items(), key=lambda item: item[1]['reported_ips'], reverse=True))
3435
i = 0
3536

3637
with mmdb_database(args.asn_db) as m:

0 commit comments

Comments
 (0)