无法与 Nessus 服务器建立连接

fail to create a connection with nessus server

我正在尝试使用 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',))

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

编辑:我直接从 tenable

找到了更好的来源

What has been removed from Nessus 7: There is a restriction in scan API capabilities. The ability to manage scans via API and CLI has been removed in v7. All Nessus Pro scanning operations must be done through the user interface. So currently the ability of the Nessus API is as follows:

Removed the ability to run scans or reports and create new objects The Read features, where the ability to pull scan data so GET /scan/scan ID now works again and this aids with some of the integration processes.

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

这仅适用于 Nessus 专业版