digininja icon

Nessus from Python

digininja | PRO | 05/19/16 08:23:02 AM UTC | 0 ⭐ | 353 👁️ | Never ⏰ | []
Python |

850 B

|

None

|

0 👍

/

0 👎

from nessrest import ness6rest
 
scan = ness6rest.Scanner(url="https://localhost:8834", login="xx", password="yy", insecure=True)
 
scan.policy_add(name="Scripted Scan", plugins="10396")
 
scan.scan_add(targets="1.2.3.4")
scan.scan_run()
 
print scan.scan_results()
 
kbs = scan.download_kbs()
 
print kbs 
 
for hostname in kbs.keys():
    f = open(hostname, "w")
    f.write(kbs[hostname])
    f.close()
~                                                                                                                                                                                                                  
~                                                                                                                                                                                                                  
~

Comments