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() ~ ~ ~