Advertisement
digininja

Nessus from Python

May 19th, 2016
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.85 KB | None | 0 0
  1. from nessrest import ness6rest
  2.  
  3. scan = ness6rest.Scanner(url="https://localhost:8834", login="xx", password="yy", insecure=True)
  4.  
  5. scan.policy_add(name="Scripted Scan", plugins="10396")
  6.  
  7. scan.scan_add(targets="1.2.3.4")
  8. scan.scan_run()
  9.  
  10. print scan.scan_results()
  11.  
  12. kbs = scan.download_kbs()
  13.  
  14. print kbs
  15.  
  16. for hostname in kbs.keys():
  17.     f = open(hostname, "w")
  18.     f.write(kbs[hostname])
  19.     f.close()
  20. ~                                                                                                                                                                                                                  
  21. ~                                                                                                                                                                                                                  
  22. ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement