Page 64 - Hands-On Bug Hunting for Penetration Testers
P. 64
Preparing for an Engagement Chapter 3
for item in data:
for vulnerability in item['results'][0]['vulnerabilities']:
vulnerability['file'] = item.get('file', 'N/A')
row = format_bug(vulnerability)
rows.append(row)
rows = sorted(rows, key=lambda x: x[0])
print(
"""
,--. ,---. ,-----.
| |' .-' | |) /_ ,--.,--. ,---. ,---.
,--. | |`. `-. | .-. \| || || .-. |( .-'
| '-' /.-' | | '--' /' '' '' '-' '.-' `)
`-----' `-----' `------' `----' .`- / `----'
`---'
""")
print tabulate(rows, headers=['Severity', 'Summary', 'Info & File'])
And the following is what it looks like when it's run on the Terminal. I'm running the
TDBOKT TI script wrapper and then piping the data to GPSNBUKT QZ. Here's the
command:
./scanjs.sh ~/Code/Essences/demo test.json | python formatjs.py
And here's the output:
[ 49 ]