Skip to content

Commit 8e70b42

Browse files
committed
add bkprintres
1 parent 6f43d7f commit 8e70b42

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

bkprintres

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/python3
2+
#
3+
# SPDX-License-Identifier: 0BSD
4+
# Part of badkeys: https://badkeys.info/
5+
#
6+
# Converts badkeys json log to standard badkeys console output
7+
8+
import argparse
9+
import json
10+
11+
from badkeys.runcli import _printresults
12+
13+
ap = argparse.ArgumentParser()
14+
ap.add_argument("logfile")
15+
ap.add_argument("--all", action="store_true")
16+
ap.add_argument("--json", action="store_true")
17+
ap.add_argument("--verbose", action="store_true")
18+
ap.add_argument("--url", action="store_true")
19+
args = ap.parse_args()
20+
21+
with open(args.logfile) as f:
22+
for line in f:
23+
j = json.loads(line)
24+
_printresults(j, j["where"], args=args)

0 commit comments

Comments
 (0)