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

ConnectionResetError when running --http_headers #500

Closed
wondex opened this issue Feb 12, 2021 · 3 comments
Closed

ConnectionResetError when running --http_headers #500

wondex opened this issue Feb 12, 2021 · 3 comments

Comments

@wondex
Copy link

wondex commented Feb 12, 2021

Describe the bug

Traceback (most recent call last):
  File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/scanner.py", line 264, in get_results
    result = implementation_cls.result_for_completed_scan_jobs(
  File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/plugins/http_headers_plugin.py", line 165, in result_for_completed_scan_jobs
    return completed_scan_jobs[0].result()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/concurrent/futures/_base.py", line 388, in __get_result
    raise self._exception
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/plugins/http_headers_plugin.py", line 184, in _retrieve_and_analyze_http_response
    http_response = HttpResponseParser.parse_from_ssl_connection(ssl_connection.ssl_client)
  File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/connection_helpers/http_response_parser.py", line 23, in parse_from_ssl_connection
    return cls._parse(ssl_conn.read)
  File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/connection_helpers/http_response_parser.py", line 29, in _parse
    response = read_method(4096)
  File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/nassl/ssl_client.py", line 223, in read
    encrypted_data = self._sock.recv(self._DEFAULT_BUFFER_SIZE)
ConnectionResetError: [Errno 104] Connection reset by peer

To Reproduce
Install SSLyze using: pip
Run the following command: /opt/rh/rh-python38/root/usr/bin/python3.8 -m sslyze --regular

Expected behavior
Successful scan

Python environment (please complete the following information):
OS: Red Hat Enterprise Linux Server release 7.9 (Maipo)
Python version: 3.8
SSLyzeL: 4.0.2

@nabla-c0d3 nabla-c0d3 changed the title robot BUG_IN_SSLYZE TlsHandshakeTimedOut when running robot Feb 13, 2021
@nabla-c0d3 nabla-c0d3 changed the title TlsHandshakeTimedOut when running robot ConnectionResetError when running scan commands Feb 13, 2021
@nabla-c0d3 nabla-c0d3 added the bug label Feb 13, 2021
@nabla-c0d3
Copy link
Owner

@wondex Could you send me the server that triggered this issue? Otherwise I won't be able to fix it. Thanks!

@wondex
Copy link
Author

wondex commented Feb 16, 2021

Hi Alban,

This are internal hosts, but the behavior of this hosts are the same:
The are not sending any response headers.

Google Chrome browser:
Status = (failed) net::ERR_CONNECTION_RESET

Curl:

> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: <internal host>
> Accept: */*
>
* SSL read: errno -5961 (PR_CONNECT_RESET_ERROR)
* TCP connection reset by peer
* Closing connection 0
curl: (56) TCP connection reset by peer

@nabla-c0d3 nabla-c0d3 changed the title ConnectionResetError when running scan commands ConnectionResetError when running --http_headers Feb 21, 2021
@nabla-c0d3
Copy link
Owner

Fixed in v4.0.4.

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

No branches or pull requests

2 participants