0

我正在尝试使用 python 中的波纹管命令与 Nessus 服务器建立连接,但它失败并显示错误消息你能告诉我可能是什么原因吗?我已经检查了我的网络连接,它很好。

requests.post( 'https://164.99.175.30:8834/'+ '/session',data={'username':'admin','password':'micro@123'},verify=False)```


error message 

Traceback (most recent call last):
  File "nessus.py", line 425, in <module>
    login()
  File "nessus.py", line 111, in login
    res = requests.post(url + '/session',data={'username':username,'password':password},verify=verify)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 119, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='localhost', port=8834): Max retries exceeded with url: /session (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f46f2d6d410>: Failed to establish a new connection: [Errno 111] Connection refused',))
4

1 回答 1

0

nessus api 从 7.x 版本开始贬值,这是我能找到的最好的来源。

编辑:我直接从 tenable 找到了更好的来源

从 Nessus 7 中删除的内容:扫描 API 功能存在限制。通过 API 和 CLI 管理扫描的功能已在 v7 中删除。所有 Nessus Pro 扫描操作都必须通过用户界面完成。所以目前Nessus API的能力如下:

删除了运行扫描或报告并创建新对象的功能读取功能,其中可以提取扫描数据以便 GET /scan/scan ID 现在再次工作,这有助于一些集成过程。

https://community.tenable.com/s/article/The-differences-between-Nessus-6-and-Nessus-7

这仅适用于 Nessus 专业版

于 2021-02-12T15:52:58.640 回答