gremwell / pynessus

Client for the Nessus vulnerability scanner REST API.
Other
13 stars 6 forks source link

error SSL when login #9

Open toantv90 opened 8 years ago

toantv90 commented 8 years ago

There are a error when i login using username, pass: if server.login(User("admin", "admin")): File "C:\Python27\lib\site-packages\pynessus\nessus.py", line 205, in login response = self._api_request("POST", "/login", params) File "C:\Python27\lib\site-packages\pynessus\nessus.py", line 157, in _api_request response = json.loads(self._request(method, target, json.dumps(params))) File "C:\Python27\lib\site-packages\pynessus\nessus.py", line 130, in _request self._connection.request(method, target, params, self._headers if headers is None else headers) File "C:\Python27\lib\httplib.py", line 1053, in request self._send_request(method, url, body, headers) File "C:\Python27\lib\httplib.py", line 1093, in _send_request self.endheaders(body) File "C:\Python27\lib\httplib.py", line 1049, in endheaders self._send_output(message_body) File "C:\Python27\lib\httplib.py", line 893, in _send_output self.send(msg) File "C:\Python27\lib\httplib.py", line 855, in send self.connect() File "C:\Python27\lib\httplib.py", line 1274, in connect server_hostname=server_hostname) File "C:\Python27\lib\ssl.py", line 352, in wrap_socket _context=self) File "C:\Python27\lib\ssl.py", line 579, in init self.do_handshake() File "C:\Python27\lib\ssl.py", line 808, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

freetest commented 8 years ago

the same Error

freetest commented 8 years ago

@chikiru900 fix that?

jekil commented 8 years ago

I had a quick look to the code, it seems to me an "insecure" method to skip certificate validation is missing.

freetest commented 8 years ago

@jekil you can fix that? can i get your mail or skype ID?

jekil commented 8 years ago

@freetest I just used nessrest

freetest commented 8 years ago

@jekil

i use nessrest , python2.7 nessus 6.X.

import nessrest import ness6rest

scan = ness6rest.Scanner(url="https://127.0.0.1:8834", login="root", password="123")

show me this error

TypeError: str returned non-string (type Error)

jekil commented 8 years ago

@freetest you should read the documentation, it works if used properly

AdmiralGaust commented 7 years ago

@jekil you need to do it something like this to get rid of SSL error

scan = ness6rest.Scanner(url="https://127.0.0.1:8834", login="root", password="123",insecure=True)