我正在评估 Nessus 7 产品以在我的网络中的系统上执行漏洞扫描。我能够成功执行扫描,但我无法使用 python Nessrest 客户端自动化它。nessrest 客户端抛出以下错误。请帮我解决这个问题。谢谢你。
No Title
*****************START ERROR*****************
JSON :
{"uuid": "ab4bacd2-05f6-425c-9d79-3ba3940ad1c24e51e1f403febe40",
"settings": {"text_targets": "targetIp", "file_targets": "",
"folder_id": 82, "description": "Created with REST API", "filters": [],
"launch": "ON_DEMAND", "scanner_id": "1", "emails": "", "filter_type": "",
"name": ""}}
{}
HEADERS :
{'X-Cookie': 'token=1c1c4f11e325eb19440feaaf04706d1265f347d105a06f44',
'Content-type': 'application/json', 'Accept': 'text/plain'}
URL : https://ipaddress:8834/scans
METHOD : POST
RESPONSE: 412
{
"error": "API is not available"
}
******************END ERROR******************
Traceback (most recent call last):
File "nessrest.py", line 1, in <module>
import nessrest
File "C:\Users\ballalc\nessrest.py", line 8, in <module>
scan.scan_add(targets="ipaddress")
File "C:\Users\ballalc\ness6rest.py", line 705, in scan_add
self.scan_uuid = self.res["scan"]["uuid"]
KeyError: 'scan'