-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
When python-cryptography
or python3-cryptography
packages are not installed, the KRACK module cannot be loaded.
>>> load_module("krack")
ERROR: Loading module scapy.modules.krack
Traceback (most recent call last):
File "/home/ria/scapy/scapy/main.py", line 150, in _load
mod = importlib.import_module(module)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ria/scapy/scapy/modules/krack/__init__.py", line 28, in <module>
from scapy.modules.krack.automaton import KrackAP # noqa: F401
File "/home/ria/scapy/scapy/modules/krack/automaton.py", line 7, in <module>
from cryptography.hazmat.primitives import hashes
ModuleNotFoundError: No module named 'cryptography'
Calling @commial to assess whether the module could still offer functionalities with a crypto_valid
around some blocks. But at first glance I believe a missing cryptography
should completely prevent importing the module.
scapy/scapy/modules/krack/automaton.py
Lines 6 to 10 in a58e1b9
from cryptography.hazmat.primitives import hashes | |
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC | |
from cryptography.hazmat.backends import default_backend | |
scapy/scapy/modules/krack/crypto.py
Lines 6 to 9 in a58e1b9
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms | |
from cryptography.hazmat.backends import default_backend | |