Quantcast
Channel: Active questions tagged nessus - Stack Overflow
Viewing all articles
Browse latest Browse all 232

pytenable: myobj = sc.audit_files.export_audit(1, fobj=None) results in "Resource is not supported."

$
0
0

This is about using python to access a Nessus (Tenable) Server via the library pytenable to manage scans, retrieve results etc. Although it was a bit hard to find out how to make it work, after some trial and error I managed to get helpful results like generating assets, audit files, policies and scans, start scans and retrieve results. But retrieving audit files just refuses to work:

myobj = sc.audit_files.export_audit(1, fobj=None)
results in
"Resource is not supported."
while
myobj = sc.audit_files.details(1)
works correct.

I tried to use a file opened for binary write like this:
h=open('test.audit','bw'); myobj = tsc.audit_files.export_audit(1,fobj=h)
same result:

tenable.errors.APIError: None:403 {"type":"regular","response":"","error_code":10,"error_msg":"Resource is not supported.","warnings":[],"timestamp":1569578167}

Using similar mechanics to retrieve scan results like this:
myobj = sc.scan_instances.export_scan(1, fobj=None)
works as expected without any errors.

What nasty details am I missing? Did anyone succeed retrieving audit files?


Viewing all articles
Browse latest Browse all 232


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>