Skip to content

Instantly share code, notes, and snippets.

@jgamblin
Last active December 19, 2016 22:11
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgamblin/173778fd95b9e21afd1aa4ed16bb0694 to your computer and use it in GitHub Desktop.
Save jgamblin/173778fd95b9e21afd1aa4ed16bb0694 to your computer and use it in GitHub Desktop.
List Top 10 Vuln System With Details
#!/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