Last active
December 19, 2016 22:11
-
-
Save jgamblin/173778fd95b9e21afd1aa4ed16bb0694 to your computer and use it in GitHub Desktop.
List Top 10 Vuln System With Details
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from securitycenter import SecurityCenter5 | |
import subprocess | |
def vulns(): | |
sc = SecurityCenter5('nessus') | |
sc.login('nessusapi', 'Afinepassword!') | |
response = sc.get('status') | |
hosts = sc.analysis(tool='sumip', page=0, page_size=10, sortDir='desc',sortField='score') | |
print('\n') | |
print("[Top 10 Vulnerable Hosts]") | |
print('\n') | |
for v in hosts: | |
print('-' * 50) | |
print('IP: ' + v['ip']) | |
print('DNS: ' + v['dnsName']) | |
print('OS: ' + v['osCPE']) | |
print('Critical Vulenrablities: ' + v['severityCritical']) | |
print('High Vulnerabilities ' + v['severityHigh']) | |
print('Medium Vulnerabilities ' + v['severityMedium']) | |
print('-' * 50) | |
print('\n') | |
sc.logout | |
vulns() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment