forked from Neo23x0/munin
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmunin-json-parse.py
More file actions
25 lines (18 loc) · 791 Bytes
/
munin-json-parse.py
File metadata and controls
25 lines (18 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/python
import json
import sys
import colorama
from colorama import Fore,Style
with open(sys.argv[1], "r") as f:
data = json.load(f)
print ("----------------------------------------------------")
print ( "Total Hash Count : %s" % len(data))
print ( "Showing Suspicious and Malicious Entries Only")
print ("----------------------------------------------------")
for x in data:
if not any(s in x['rating'] for s in ('unknown', 'clean')):
if 'malicious' in x['rating']:
print (Fore.RED + "%s has been detected by %s AVs and rated as %s, Possible Filenames include %s." % (x['hash'], x['result'], x['rating'], x['filenames']))
print(Style.RESET_ALL, end='')
else:
print ("%s has been detected by %s AVs and rated as %s." % (x['hash'], x['result'], x['rating']))