Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL issue #12

Open
ghost opened this issue Jul 3, 2018 · 3 comments
Open

SSL issue #12

ghost opened this issue Jul 3, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 3, 2018

I encountered the following error when attempting to run the script against a website with a self-signed or expired certificate (redacted the host ip) :

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 511, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='X.X.X.X', port=443): Max retries exceeded with url: /section.php?page=php://input (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
@ghost
Copy link
Author

ghost commented Jul 3, 2018

Fixed via adding verify=false on line 1198

r = requests.post(url=url, headers=gen_headers, data=body, verify=False)

@NovaCygni
Copy link

A better fix wouldve been to do a try: except, so if the error message is thrown you Pass over the request entirely, simply changing verify=false is a bad idea as it will still spam the failing handshakes, both noisy, and inefficient.

@NoorQureshi
Copy link

[!] Problem reaching 'https://localhost/section.php?page=/etc/passwd'.
[!] Problem connecting to the website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants