-
Notifications
You must be signed in to change notification settings - Fork 456
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
AssertionError when target cannot be resolved and parsed_command_line.servers_to_scans is empty #557
Comments
The AssertionError happens because at Line 51 in 8255872
ParsedCommandLine(invalid_servers=[InvalidServerStringError(server_string='idonotexistttt.com:443', error_message='Could not resolve hostname idonotexistttt.com')], servers_to_scans=[], scan_commands={<ScanCommand.SSL_2_0_CIPHER_SUITES: 'ssl_2_0_cipher_suites'>, <ScanCommand.CERTIFICATE_INFO: 'certificate_info'>, <ScanCommand.HEARTBLEED: 'heartbleed'>, <ScanCommand.TLS_1_1_CIPHER_SUITES: 'tls_1_1_cipher_suites'>, <ScanCommand.TLS_1_2_CIPHER_SUITES: 'tls_1_2_cipher_suites'>, <ScanCommand.ROBOT: 'robot'>, <ScanCommand.OPENSSL_CCS_INJECTION: 'openssl_ccs_injection'>, <ScanCommand.TLS_1_0_CIPHER_SUITES: 'tls_1_0_cipher_suites'>, <ScanCommand.TLS_COMPRESSION: 'tls_compression'>, <ScanCommand.SSL_3_0_CIPHER_SUITES: 'ssl_3_0_cipher_suites'>, <ScanCommand.ELLIPTIC_CURVES: 'elliptic_curves'>, <ScanCommand.TLS_1_3_CIPHER_SUITES: 'tls_1_3_cipher_suites'>, <ScanCommand.SESSION_RENEGOTIATION: 'session_renegotiation'>}, scan_commands_extra_arguments=ScanCommandsExtraArguments(certificate_info=None, session_resumption=None), json_path_out=None, should_print_json_to_console=True, should_disable_console_output=True, per_server_concurrent_connections_limit=None, concurrent_server_scans_limit=None, check_against_mozilla_config=<MozillaTlsConfigurationEnum.INTERMEDIATE: 'intermediate'>) |
This might be a good candidate for an additional CI/CD test: a server doesn't exist or doesn't resolve |
Thanks for the report; it will be fixed in the next release. |
This was fixed in v5.0.3. |
Describe the bug
Assertion error when running SSLyze against a target that does not resolve. Additionally, when using
--json_out=-
no JSON is produced, which is not how SSLyze v4 worked (see below for comparison). This causes tools that expect valid JSON output to fail.To Reproduce
Steps to reproduce the behavior:
pip install --no-cache-dir --compile -U sslyze
sslyze idonotexistttt.com
Expected behavior
Python should not throw an error, but should instead display a proper error message AND generate valid JSON that can be parsed.
SSLyze v5.0.2
SSLyze v4.1.0
Python environment (please complete the following information):
docker run -it --entrypoint=/bin/bash python:3.10.2
Additional context
None.
The text was updated successfully, but these errors were encountered: