vanhoefm / krackattacks-scripts

Other
3.3k stars 770 forks source link

ImportError: No module named Cryptodome.Cipher #78

Closed DragonDoctor2033 closed 3 years ago

DragonDoctor2033 commented 3 years ago

Hi!

I've try to execute script /krack-test-client.py and get this:

 Traceback (most recent call last):
  File "./krack-test-client.py", line 12, in <module>
    import libwifi
  File "/home/doctor/Downloads/krackattacks-scripts/krackattack/libwifi.py", line 6, in <module>
   from Cryptodome.Cipher import AES
 ImportError: No module named Cryptodome.Cipher

Try to do this command: sudo apt-get install libnl-3-dev libnl-genl-3-dev pkg-config libssl-dev net-tools git sysfsutils python-scapy python-pycryptodome

Get: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python-scapy is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python3-scapy

E: Package 'python-scapy' has no installation candidate
E: Unable to locate package python-pycryptodome

How can I install python-pycryptodome if it's unable to find this package in kali distro Linux kali 5.9.0-kali1-amd64 #1 SMP Debian 5.9.1-1kali2 (2020-10-29) x86_64 GNU/Linux

maio122 commented 3 years ago

Screenshot_2020-12-24_23-15-27 i can't compile hostapd config

vanhoefm commented 3 years ago

@DragonDoctor2033 create a python virtual environment based on the requirements.txt file:

cd krackattack
python2 -m virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

and before using the tool execute:

cd 
sudo su
source venv/bin/activate

I'll be updating the tool the next days to make this more clear in the README.

@maio122 make sure you clone the complete repository, you seem to be missing some files.

vanhoefm commented 3 years ago

This issue should now be fixed in the new version (and by following the new instructions).