View Issue Details

IDProjectCategoryView StatusLast Update
0007298Kali LinuxKali Package Bugpublic2022-02-03 03:42
ReporterLeeRock Assigned Toarnaudr  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionreopened 
Product Version2021.2 
Summary0007298: sslyze is broken
Description

root@kali:~# sslyze
Traceback (most recent call last):
File "/usr/bin/sslyze", line 33, in <module>
sys.exit(load_entry_point('sslyze==4.1.0', 'console_scripts', 'sslyze')())
File "/usr/bin/sslyze", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/sslyze/init.py", line 25, in <module>
from sslyze.plugins.scan_commands import ScanCommand, ScanCommandType
File "/usr/lib/python3/dist-packages/sslyze/plugins/scan_commands.py", line 12, in <module>
from sslyze.plugins.certificate_info.implementation import CertificateInfoImplementation
File "/usr/lib/python3/dist-packages/sslyze/plugins/certificate_info/implementation.py", line 8, in <module>
from sslyze.plugins.certificate_info._cert_chain_analyzer import (
File "/usr/lib/python3/dist-packages/sslyze/plugins/certificate_info/_cert_chain_analyzer.py", line 11, in <module>
from cryptography.x509.ocsp import load_der_ocsp_response, OCSPResponseStatus, OCSPResponse
ModuleNotFoundError: No module named 'cryptography.x509.ocsp'

Activities

g0tmi1k

g0tmi1k

2021-08-27 11:10

administrator   ~0015036

% docker run --rm --interactive --tty --entrypoint=/bin/bash --volume $(pwd):/mnt/ --workdir /mnt/ kalilinux/kali-rolling
┌──(root�8a59017fe629)-[/mnt]
└─# apt update && apt install -yqq sslyze
Get:1 http://kali.download/kali kali-rolling InRelease [30.5 kB]
Get:2 http://kali.download/kali kali-rolling/non-free amd64 Packages [201 kB]
Get:3 http://kali.download/kali kali-rolling/main amd64 Packages [17.8 MB]
Get:4 http://kali.download/kali kali-rolling/contrib amd64 Packages [108 kB]
Fetched 18.2 MB in 8s (2268 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
33 packages can be upgraded. Run 'apt list --upgradable' to see them.
The following additional packages will be installed:
  ca-certificates javascript-common libexpat1 libgpm2 libjs-jquery libjs-sphinxdoc libjs-underscore libmpdec3 libncursesw6 libpython3-stdlib libpython3.9-minimal libpython3.9-stdlib libreadline8
  libsqlite3-0 media-types openssl python3 python3-cffi-backend python3-cryptography python3-minimal python3-nassl python3-pkg-resources python3-six python3-tls-parser python3-typing-extensions
  python3.9 python3.9-minimal readline-common
Suggested packages:
  apache2 | lighttpd | httpd gpm python3-doc python3-tk python3-venv python-cryptography-doc python3-cryptography-vectors python3-setuptools python3.9-venv python3.9-doc binutils binfmt-support
  readline-doc
The following NEW packages will be installed:
  ca-certificates javascript-common libexpat1 libgpm2 libjs-jquery libjs-sphinxdoc libjs-underscore libmpdec3 libncursesw6 libpython3-stdlib libpython3.9-minimal libpython3.9-stdlib libreadline8
  libsqlite3-0 media-types openssl python3 python3-cffi-backend python3-cryptography python3-minimal python3-nassl python3-pkg-resources python3-six python3-tls-parser python3-typing-extensions
  python3.9 python3.9-minimal readline-common sslyze
0 upgraded, 29 newly installed, 0 to remove and 33 not upgraded.
Need to get 10.8 MB of archives.
After this operation, 37.0 MB of additional disk space will be used.
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libpython3.9-minimal:amd64.
(Reading database ... 6762 files and directories currently installed.)
Preparing to unpack .../libpython3.9-minimal_3.9.2-1_amd64.deb ...
Unpacking libpython3.9-minimal:amd64 (3.9.2-1) ...
Selecting previously unselected package libexpat1:amd64.
Preparing to unpack .../libexpat1_2.2.10-2_amd64.deb ...
Unpacking libexpat1:amd64 (2.2.10-2) ...
Selecting previously unselected package python3.9-minimal.
Preparing to unpack .../python3.9-minimal_3.9.2-1_amd64.deb ...
Unpacking python3.9-minimal (3.9.2-1) ...
Setting up libpython3.9-minimal:amd64 (3.9.2-1) ...
Setting up libexpat1:amd64 (2.2.10-2) ...
Setting up python3.9-minimal (3.9.2-1) ...
Selecting previously unselected package python3-minimal.
(Reading database ... 7056 files and directories currently installed.)
Preparing to unpack .../0-python3-minimal_3.9.2-3_amd64.deb ...
Unpacking python3-minimal (3.9.2-3) ...
Selecting previously unselected package media-types.
Preparing to unpack .../1-media-types_4.0.0_all.deb ...
Unpacking media-types (4.0.0) ...
Selecting previously unselected package libmpdec3:amd64.
Preparing to unpack .../2-libmpdec3_2.5.1-2_amd64.deb ...
Unpacking libmpdec3:amd64 (2.5.1-2) ...
Selecting previously unselected package libncursesw6:amd64.
Preparing to unpack .../3-libncursesw6_6.2+20201114-2_amd64.deb ...
Unpacking libncursesw6:amd64 (6.2+20201114-2) ...
Selecting previously unselected package readline-common.
Preparing to unpack .../4-readline-common_8.1-2_all.deb ...
Unpacking readline-common (8.1-2) ...
Selecting previously unselected package libreadline8:amd64.
Preparing to unpack .../5-libreadline8_8.1-2_amd64.deb ...
Unpacking libreadline8:amd64 (8.1-2) ...
Selecting previously unselected package libsqlite3-0:amd64.
Preparing to unpack .../6-libsqlite3-0_3.34.1-3_amd64.deb ...
Unpacking libsqlite3-0:amd64 (3.34.1-3) ...
Selecting previously unselected package libpython3.9-stdlib:amd64.
Preparing to unpack .../7-libpython3.9-stdlib_3.9.2-1_amd64.deb ...
Unpacking libpython3.9-stdlib:amd64 (3.9.2-1) ...
Selecting previously unselected package python3.9.
Preparing to unpack .../8-python3.9_3.9.2-1_amd64.deb ...
Unpacking python3.9 (3.9.2-1) ...
Selecting previously unselected package libpython3-stdlib:amd64.
Preparing to unpack .../9-libpython3-stdlib_3.9.2-3_amd64.deb ...
Unpacking libpython3-stdlib:amd64 (3.9.2-3) ...
Setting up python3-minimal (3.9.2-3) ...
Selecting previously unselected package python3.
(Reading database ... 7494 files and directories currently installed.)
Preparing to unpack .../00-python3_3.9.2-3_amd64.deb ...
Unpacking python3 (3.9.2-3) ...
Selecting previously unselected package openssl.
Preparing to unpack .../01-openssl_1.1.1k-1_amd64.deb ...
Unpacking openssl (1.1.1k-1) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../02-ca-certificates_20210119_all.deb ...
Unpacking ca-certificates (20210119) ...
Selecting previously unselected package javascript-common.
Preparing to unpack .../03-javascript-common_11+nmu1_all.deb ...
Unpacking javascript-common (11+nmu1) ...
Selecting previously unselected package libgpm2:amd64.
Preparing to unpack .../04-libgpm2_1.20.7-8_amd64.deb ...
Unpacking libgpm2:amd64 (1.20.7-8) ...
Selecting previously unselected package libjs-jquery.
Preparing to unpack .../05-libjs-jquery_3.5.1+dfsg+~3.5.5-7_all.deb ...
Unpacking libjs-jquery (3.5.1+dfsg+~3.5.5-7) ...
Selecting previously unselected package libjs-underscore.
Preparing to unpack .../06-libjs-underscore_1.9.1~dfsg-3_all.deb ...
Unpacking libjs-underscore (1.9.1~dfsg-3) ...
Selecting previously unselected package libjs-sphinxdoc.
Preparing to unpack .../07-libjs-sphinxdoc_3.4.3-2_all.deb ...
Unpacking libjs-sphinxdoc (3.4.3-2) ...
Selecting previously unselected package python3-cffi-backend:amd64.
Preparing to unpack .../08-python3-cffi-backend_1.14.6-1_amd64.deb ...
Unpacking python3-cffi-backend:amd64 (1.14.6-1) ...
Selecting previously unselected package python3-six.
Preparing to unpack .../09-python3-six_1.16.0-2_all.deb ...
Unpacking python3-six (1.16.0-2) ...
Selecting previously unselected package python3-cryptography.
Preparing to unpack .../10-python3-cryptography_3.3.2-1_amd64.deb ...
Unpacking python3-cryptography (3.3.2-1) ...
Selecting previously unselected package python3-nassl.
Preparing to unpack .../11-python3-nassl_4.0.0-0kali2_amd64.deb ...
Unpacking python3-nassl (4.0.0-0kali2) ...
Selecting previously unselected package python3-pkg-resources.
Preparing to unpack .../12-python3-pkg-resources_52.0.0-4_all.deb ...
Unpacking python3-pkg-resources (52.0.0-4) ...
Selecting previously unselected package python3-tls-parser.
Preparing to unpack .../13-python3-tls-parser_1.2.2-0kali1_all.deb ...
Unpacking python3-tls-parser (1.2.2-0kali1) ...
Selecting previously unselected package python3-typing-extensions.
Preparing to unpack .../14-python3-typing-extensions_3.7.4.3-1_all.deb ...
Unpacking python3-typing-extensions (3.7.4.3-1) ...
Selecting previously unselected package sslyze.
Preparing to unpack .../15-sslyze_4.1.0-0kali1_all.deb ...
Unpacking sslyze (4.1.0-0kali1) ...
Setting up media-types (4.0.0) ...
Setting up javascript-common (11+nmu1) ...
Setting up libgpm2:amd64 (1.20.7-8) ...
Setting up libsqlite3-0:amd64 (3.34.1-3) ...
Setting up libncursesw6:amd64 (6.2+20201114-2) ...
Setting up libmpdec3:amd64 (2.5.1-2) ...
Setting up libjs-jquery (3.5.1+dfsg+~3.5.5-7) ...
Setting up openssl (1.1.1k-1) ...
Setting up readline-common (8.1-2) ...
Setting up libjs-underscore (1.9.1~dfsg-3) ...
Setting up libreadline8:amd64 (8.1-2) ...
Setting up ca-certificates (20210119) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
129 added, 0 removed; done.
Setting up libjs-sphinxdoc (3.4.3-2) ...
Setting up libpython3.9-stdlib:amd64 (3.9.2-1) ...
Setting up libpython3-stdlib:amd64 (3.9.2-3) ...
Setting up python3.9 (3.9.2-1) ...
Setting up python3 (3.9.2-3) ...
running python rtupdate hooks for python3.9...
running python post-rtupdate hooks for python3.9...
Setting up python3-six (1.16.0-2) ...
Setting up python3-typing-extensions (3.7.4.3-1) ...
Setting up python3-nassl (4.0.0-0kali2) ...
Setting up python3-cffi-backend:amd64 (1.14.6-1) ...
Setting up python3-pkg-resources (52.0.0-4) ...
Setting up python3-tls-parser (1.2.2-0kali1) ...
Setting up python3-cryptography (3.3.2-1) ...
Setting up sslyze (4.1.0-0kali1) ...
Processing triggers for libc-bin (2.31-12) ...
Processing triggers for ca-certificates (20210119) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.

┌──(root�8a59017fe629)-[/mnt]
└─#

┌──(root�8a59017fe629)-[/mnt]
└─# sslyze
  Command line error: No targets to scan.
  Use -h for help.

┌──(root�8a59017fe629)-[/mnt]
└─#

┌──(root�8a59017fe629)-[/mnt]
└─# dpkg -l | grep sslyze
ii  sslyze                     4.1.0-0kali1                 all          Fast and full-featured SSL scanner

┌──(root�8a59017fe629)-[/mnt]
└─#
g0tmi1k

g0tmi1k

2021-08-27 11:11

administrator   ~0015037

Please could you provide more details of the issue

LeeRock

LeeRock

2021-08-27 13:49

reporter   ~0015045

Same problem persists after running you command.

root@kali:~# apt update && apt install -yqq sslyze
Ign:1 https://packages.microsoft.com/debian/10/prod buster InRelease
Hit:2 http://kali.download/kali kali-rolling InRelease
Ign:1 https://packages.microsoft.com/debian/10/prod buster InRelease
Ign:1 https://packages.microsoft.com/debian/10/prod buster InRelease
Err:1 https://packages.microsoft.com/debian/10/prod buster InRelease
Temporary failure resolving 'packages.microsoft.com'
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
28 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch https://packages.microsoft.com/debian/10/prod/dists/buster/InRelease Temporary failure resolving 'packages.microsoft.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
sslyze is already the newest version (4.1.0-0kali1).
0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.

root@kali:~# sslyze -h
Traceback (most recent call last):
File "/usr/bin/sslyze", line 33, in <module>
sys.exit(load_entry_point('sslyze==4.1.0', 'console_scripts', 'sslyze')())
File "/usr/bin/sslyze", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/sslyze/init.py", line 25, in <module>
from sslyze.plugins.scan_commands import ScanCommand, ScanCommandType
File "/usr/lib/python3/dist-packages/sslyze/plugins/scan_commands.py", line 12, in <module>
from sslyze.plugins.certificate_info.implementation import CertificateInfoImplementation
File "/usr/lib/python3/dist-packages/sslyze/plugins/certificate_info/implementation.py", line 8, in <module>
from sslyze.plugins.certificate_info._cert_chain_analyzer import (
File "/usr/lib/python3/dist-packages/sslyze/plugins/certificate_info/_cert_chain_analyzer.py", line 11, in <module>
from cryptography.x509.ocsp import load_der_ocsp_response, OCSPResponseStatus, OCSPResponse
ModuleNotFoundError: No module named 'cryptography.x509.ocsp'

arnaudr

arnaudr

2021-09-02 06:39

manager   ~0015069

I see in your logs:

0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.

Can you try to upgrade your system? Run " apt update && apt -y full-upgrade ". Post the output here please!

LeeRock

LeeRock

2021-09-02 13:49

reporter   ~0015077

Fixed now, thanks!

LeeRock

LeeRock

2022-01-28 19:51

reporter   ~0015673

This issue has returned in 2021.4.
Same errors.
I tried the same fix but this time it didn't work.

arnaudr

arnaudr

2022-02-03 03:42

manager   ~0015685

I don't understand your error. I just tried in the Kali Live image 2021.4 and sslyze works out of the box. I also tried in a Kali container (kali-rolling) as suggested above by g0tmi1k, to check the very latest version, and it works.

I don't know, either you customized your Kali system and you ended up breaking it. Or maybe you upgraded an old version of Kali and something weird happened. In any case, this is not a bug in Kali.

You should head to https://forums.kali.org to ask for help over there. Good luck!

Issue History

Date Modified Username Field Change
2021-08-26 23:09 LeeRock New Issue
2021-08-27 11:10 g0tmi1k Note Added: 0015036
2021-08-27 11:11 g0tmi1k Note Added: 0015037
2021-08-27 11:11 g0tmi1k Status new => closed
2021-08-27 11:11 g0tmi1k Resolution open => no change required
2021-08-27 13:49 LeeRock Status closed => feedback
2021-08-27 13:49 LeeRock Resolution no change required => reopened
2021-08-27 13:49 LeeRock Note Added: 0015045
2021-09-02 06:39 arnaudr Note Added: 0015069
2021-09-02 13:49 LeeRock Note Added: 0015077
2021-09-02 13:49 LeeRock Status feedback => new
2021-09-02 14:10 arnaudr Assigned To => arnaudr
2021-09-02 14:10 arnaudr Status new => resolved
2021-09-02 14:10 arnaudr Resolution reopened => fixed
2022-01-28 19:51 LeeRock Status resolved => feedback
2022-01-28 19:51 LeeRock Resolution fixed => reopened
2022-01-28 19:51 LeeRock Note Added: 0015673
2022-02-03 03:42 arnaudr Note Added: 0015685
2022-02-03 03:42 arnaudr Status feedback => closed