vanhoefm / krackattacks-scripts

Other
3.33k stars 768 forks source link

I have this error what is the problem??? #54

Closed Alec07007 closed 6 years ago

Alec07007 commented 6 years ago

root@Alex:~/Downloads/krackattacks-scripts-research/krackattack# sudo ./krack-ft-test.py Traceback (most recent call last): File "./krack-ft-test.py", line 10, in from scapy.all import File "/usr/local/lib/python2.7/dist-packages/scapy/all.py", line 10, in from .config import File "/usr/local/lib/python2.7/dist-packages/scapy/config.py", line 11, in from .data import * File "/usr/local/lib/python2.7/dist-packages/scapy/data.py", line 184, in TCP_SERVICES,UDP_SERVICES=load_services("/etc/services") File "/usr/local/lib/python2.7/dist-packages/scapy/data.py", line 109, in load_services f=open(filename, errors='ignore') TypeError: 'errors' is an invalid keyword argument for this function

b03902043 commented 6 years ago

I believe that the author use python3 instead of 2.

The open function defined in https://docs.python.org/3/library/functions.html#open.

Sorry, it should be wrong scapy package.

similar issue

PeterGardas commented 6 years ago

The problem is here (for me) sudo pip install scapy Requirement already satisfied: scapy in /usr/local/lib/python3.6/dist-packages As you can see, it says that i cant install scapy with pip for python2 becouse it is already in python3.6 folder and for that reason i thing it is trying to use python3 scapy over python2 scapy so you need to find tutorial how to get rid of this (if you have the same problem which i thing you have).

Feel free to contact me

PeterGardas commented 6 years ago

Okay so i found a solution for this problem, this might be fix only for me so just try it :D.

  1. remove all scapy for python2 from your computer sudo pip2 uninstall scapy 1.1 If this isnt working try removing even the python3 version of scapy
  2. install scapy for PYTHON2 sudo pip2 install scapy
  3. now try to run sudo python krack-ft-test.py --help and it should work. Well i see some matplotlib errors so....

Hope this helps. You can share this to other discussions.

Best regards. Snailing Goat