Open AlmightyOatmeal opened 7 years ago
There was a related issue already up, will test.
This issue has occurred with Pyrit 0.4.0 as well as the latest from github as of minutes ago.
@AlmightyOatmeal - this is not an "issue" with Pyrit. This is an issue with your dependencies. For the Scapy module first check which one you installed - the one for Python 2 or the one for Python 3? Python 3 is used as the standard on all distros now. But Pyrit was written back in the days of Python 2, so your Scapy must match for Python2 not Python3.
Here is proof there is nothing wrong with Pyrit in regards to python-scapy @JPaulMora
[root@archlinux ~]# pyrit selftest
Pyrit 0.5.1 (C) 2008-2011 Lukas Lueg - 2015 John Mora
https://github.com/JPaulMora/Pyrit
This code is distributed under the GNU General Public License v3+
Cores incorporated in the test:
CPUs:
#1: 'CPU-Core (SSE2/AES)'
#2: 'CPU-Core (SSE2/AES)'
#3: 'CPU-Core (SSE2/AES)'
#4: 'CPU-Core (SSE2/AES)'
GPUs:
#1: 'CUDA-Device #1 'GeForce GT 730M''
Running selftest...
All results verified. Your installation seems OK
This was built yesterday with sources from git and everything is working perfectly smooth. Don't fix something that doesn't need to be fixed. You may end up with more problems than you started with (which is 0 right now).
@AlmightyOatmeal - in regards to my previous comment, make sure python2-scapy is being installed where Pyrit is looking for it. Or create a symlink to it. Because I just used one of the test pcap dump files which came with Pyrit when I cloned it. Again, this version of Pyrit was build yesterday, which suggests the problem is on your end, not Pyrit's.
[root@archlinux downloads]# pyrit -r wpa2psk-MOM1.dump analyze
Pyrit 0.5.1 (C) 2008-2011 Lukas Lueg - 2015 John Mora
https://github.com/JPaulMora/Pyrit
This code is distributed under the GNU General Public License v3+
Parsing file 'wpa2psk-MOM1.dump' (1/1)...
Parsed 9 packets (9 802.11-packets), got 1 AP(s)
#1: AccessPoint 00:21:29:72:a3:19 ('MOM1'):
#1: Station 00:21:00:ab:55:a9, 1 handshake(s):
#1: HMAC_SHA1_AES, bad, spread 1
[root@archlinux downloads]#
@RFKiller,
Scapy is installed where all of the other site packages are and I've demonstrated that it is installed properly. It is not my responsibility to create symlinks when they aren't required. It doesn't matter where pyrit is looking for Scapy because it is being installed in the proper location.
Again, as I've demonstrated, I can use scapy just fine which does indicate it is a Pyrit problem. Please re-read the information I provided prior to responding.
I had the same issue. I'm on OSX 10.11.6 which comes with python 2.7.10 I have brew with python 2.7.13 and pip. I'm using brew's python.
The issue was in scapy
itself.
If you run scapy
you can see several INFO and ERROR telling you what's missing. See this blog post. I installed everything that's written there.
One last thing that was showing an error was dumbnet
I had to install it manually as described here. After that running scapy
didn't show any errors, and running pyrit
wasn't complaining about missing scapy
.
@bumbu,
As you can see by my original post, I am not having dependency issues. Scapy by itself does work just fine.
@AlmightyOatmeal could you run /usr/bin/env python
and within that shell try to import scapy?
@RFKiller and @JPaulMora, I have already demonstrated that Python successfully imports scapy.
I don't like to repeat myself but if you didn't see the 4th code bock, it goes:
╭─jivanov@irony ~
╰─$ python -c 'import scapy'
╭─jivanov@irony ~
╰─$
For the skeptics out there who are not familiar with Python, this is what would happen if the aforementioned command were to have failed:
╭─jivanov@irony ~
╰─$ python -c 'import llama'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named llama
Now, if I include information then I expect that people would read it prior to making themselves look like fools in a public forum, READ THE INFORMATION IN IT'S ENTIRETY; specific references go out to @RFKiller and @bumbu.
I have been a Python developer for over a decade so I know it's not an import issue. I only use Python 2.7.x.
╭─jivanov@irony ~
╰─$ python -V
Python 2.7.13
This issue has been open for quite some time and I am very disappointed in the responses and the lack of reading what I had originally wrote. I don't have time to waste debugging someone else code and fixing their mistakes; I no longer have any interest in this project so close this issue if you must but the problem still exists.
@JPaulMora,
As I have said, I only have one version of Python installed. I have been a Python developer for a very very long time and I am well aware of how much fun it is to have multiple interpreters installed. However, having multiple Python versions installed is absolutely irrelevant because there was no import error which means that it's not applicable. Running python
from the shell will use the same version of Python that would be found via /usr/bin/env
as that would then depend on how mangled one's PATH environmental variable is.
@bumbu, Oh I have but you have simply said my shit is broke or tried posing things that are either irrelevant or already answered. If people ask me something that I've already answered then I get defensive because I have better things to do with my time than repeat myself.
╭─jivanov@irony ~
╰─$ scapy -h
Usage: scapy.py [-s sessionfile] [-c new_startup_file] [-p new_prestart_file] [-C] [-P]
-C: do not read startup file
-P: do not read pre-startup file
╭─jivanov@irony ~
╰─$ which scapy
/usr/local/bin/scapy
╭─jivanov@irony ~
╰─$ which python
/usr/local/bin/python
╭─jivanov@irony ~
╰─$ whereis python
python: /usr/local/bin/python /usr/ports/lang/python
╭─jivanov@irony ~
╰─$ ls -alh /usr/local/bin/*python*
lrwxr-xr-x 1 root wheel 24B Apr 21 2016 /usr/local/bin/python -> /usr/local/bin/python2.7
lrwxr-xr-x 1 root wheel 9B Mar 7 18:54 /usr/local/bin/python2 -> python2.7
lrwxr-xr-x 1 root wheel 16B Mar 7 18:54 /usr/local/bin/python2-config -> python2.7-config
-r-xr-xr-x 1 root wheel 5.4K Mar 7 18:16 /usr/local/bin/python2.7
-r-xr-xr-x 1 root wheel 1.7K Mar 7 18:16 /usr/local/bin/python2.7-config
╭─jivanov@irony ~
╰─$ echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/jivanov/bin
╭─jivanov@irony ~
╰─$ env
_=/usr/bin/env
LSCOLORS=Gxfxcxdxbxegedabagacad
LESS=-R
PAGER=less
UPDATE_ZSH_DAYS=2
ZSH=/home/jivanov/.oh-my-zsh
LC_ALL=en_US.UTF-8
OLDPWD=/home/jivanov
PWD=/home/jivanov
SHLVL=1
USER=jivanov
LOGNAME=jivanov
HOME=/home/jivanov
MAIL=/var/mail/jivanov
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/jivanov/bin
TERM=xterm-256color
BLOCKSIZE=K
SHELL=/usr/local/bin/zsh
SSH_CLIENT=<censored> <censored> <censored>
SSH_CONNECTION=<censored> <censored> <censored> <censored>
╭─jivanov@irony ~
╰─$ sudo truss -fade -o truss.pyrit.20170307a pyrit -r data.Kismac.NewOffice/DumpLog_17-03-01T09_21 analyze
Pyrit 0.5.1 (C) 2008-2011 Lukas Lueg - 2015 John Mora
https://github.com/JPaulMora/Pyrit
This code is distributed under the GNU General Public License v3+
Scapy 2.x is required to use Pyrit's analyze/attack functions but seems to be unavailable.
...
╭─jivanov@irony ~
╰─$ egrep "open.*ERR#2" truss.pyrit.20170307a | egrep -o "\".*?\"" | tr -d "\"" | sort | uniq | egrep -i "scapy"
/usr/local/bin/scapy.py
/usr/local/bin/scapy.pyc
/usr/local/bin/scapy.so
/usr/local/bin/scapymodule.so
/usr/local/lib/python2.7/lib-dynload/scapy.py
/usr/local/lib/python2.7/lib-dynload/scapy.pyc
/usr/local/lib/python2.7/lib-dynload/scapy.so
/usr/local/lib/python2.7/lib-dynload/scapymodule.so
/usr/local/lib/python2.7/lib-tk/scapy.py
/usr/local/lib/python2.7/lib-tk/scapy.pyc
/usr/local/lib/python2.7/lib-tk/scapy.so
/usr/local/lib/python2.7/lib-tk/scapymodule.so
/usr/local/lib/python2.7/plat-freebsd11/scapy.py
/usr/local/lib/python2.7/plat-freebsd11/scapy.pyc
/usr/local/lib/python2.7/plat-freebsd11/scapy.so
/usr/local/lib/python2.7/plat-freebsd11/scapymodule.so
/usr/local/lib/python2.7/scapy.py
/usr/local/lib/python2.7/scapy.pyc
/usr/local/lib/python2.7/scapy.so
/usr/local/lib/python2.7/scapymodule.so
/usr/local/lib/python2.7/site-packages/cpyrit/scapy.py
/usr/local/lib/python2.7/site-packages/cpyrit/scapy.pyc
/usr/local/lib/python2.7/site-packages/cpyrit/scapy.so
/usr/local/lib/python2.7/site-packages/cpyrit/scapymodule.so
/usr/local/lib/python2.7/site-packages/scapy/__future__.py
/usr/local/lib/python2.7/site-packages/scapy/__future__.pyc
/usr/local/lib/python2.7/site-packages/scapy/__future__.so
/usr/local/lib/python2.7/site-packages/scapy/__future__module.so
/usr/local/lib/python2.7/site-packages/scapy/__init__.so
/usr/local/lib/python2.7/site-packages/scapy/__init__module.so
/usr/local/lib/python2.7/site-packages/scapy/ansmachine.so
/usr/local/lib/python2.7/site-packages/scapy/ansmachinemodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/__future__.py
/usr/local/lib/python2.7/site-packages/scapy/arch/__future__.pyc
/usr/local/lib/python2.7/site-packages/scapy/arch/__future__.so
/usr/local/lib/python2.7/site-packages/scapy/arch/__future__module.so
/usr/local/lib/python2.7/site-packages/scapy/arch/__init__.so
/usr/local/lib/python2.7/site-packages/scapy/arch/__init__module.so
/usr/local/lib/python2.7/site-packages/scapy/arch/consts.so
/usr/local/lib/python2.7/site-packages/scapy/arch/constsmodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/fcntl.py
/usr/local/lib/python2.7/site-packages/scapy/arch/fcntl.pyc
/usr/local/lib/python2.7/site-packages/scapy/arch/fcntl.so
/usr/local/lib/python2.7/site-packages/scapy/arch/fcntlmodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/matplotlib.py
/usr/local/lib/python2.7/site-packages/scapy/arch/matplotlib.pyc
/usr/local/lib/python2.7/site-packages/scapy/arch/matplotlib.so
/usr/local/lib/python2.7/site-packages/scapy/arch/matplotlibmodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/os.py
/usr/local/lib/python2.7/site-packages/scapy/arch/os.pyc
/usr/local/lib/python2.7/site-packages/scapy/arch/os.so
/usr/local/lib/python2.7/site-packages/scapy/arch/osmodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/pcap.py
/usr/local/lib/python2.7/site-packages/scapy/arch/pcap.pyc
/usr/local/lib/python2.7/site-packages/scapy/arch/pcap.so
/usr/local/lib/python2.7/site-packages/scapy/arch/pcapdnet.so
/usr/local/lib/python2.7/site-packages/scapy/arch/pcapdnetmodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/pcapmodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/pcapy.py
/usr/local/lib/python2.7/site-packages/scapy/arch/pcapy.pyc
/usr/local/lib/python2.7/site-packages/scapy/arch/pcapy.so
/usr/local/lib/python2.7/site-packages/scapy/arch/pcapymodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/pyx.py
/usr/local/lib/python2.7/site-packages/scapy/arch/pyx.pyc
/usr/local/lib/python2.7/site-packages/scapy/arch/pyx.so
/usr/local/lib/python2.7/site-packages/scapy/arch/pyxmodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/scapy.py
/usr/local/lib/python2.7/site-packages/scapy/arch/scapy.pyc
/usr/local/lib/python2.7/site-packages/scapy/arch/scapy.so
/usr/local/lib/python2.7/site-packages/scapy/arch/scapymodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/socket.py
/usr/local/lib/python2.7/site-packages/scapy/arch/socket.pyc
/usr/local/lib/python2.7/site-packages/scapy/arch/socket.so
/usr/local/lib/python2.7/site-packages/scapy/arch/socketmodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/struct.py
/usr/local/lib/python2.7/site-packages/scapy/arch/struct.pyc
/usr/local/lib/python2.7/site-packages/scapy/arch/struct.so
/usr/local/lib/python2.7/site-packages/scapy/arch/structmodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/sys.py
/usr/local/lib/python2.7/site-packages/scapy/arch/sys.pyc
/usr/local/lib/python2.7/site-packages/scapy/arch/sys.so
/usr/local/lib/python2.7/site-packages/scapy/arch/sysmodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/time.py
/usr/local/lib/python2.7/site-packages/scapy/arch/time.pyc
/usr/local/lib/python2.7/site-packages/scapy/arch/time.so
/usr/local/lib/python2.7/site-packages/scapy/arch/timemodule.so
/usr/local/lib/python2.7/site-packages/scapy/arch/unix.so
/usr/local/lib/python2.7/site-packages/scapy/arch/unixmodule.so
/usr/local/lib/python2.7/site-packages/scapy/array.py
/usr/local/lib/python2.7/site-packages/scapy/array.pyc
/usr/local/lib/python2.7/site-packages/scapy/array.so
/usr/local/lib/python2.7/site-packages/scapy/arraymodule.so
/usr/local/lib/python2.7/site-packages/scapy/base_classes.so
/usr/local/lib/python2.7/site-packages/scapy/base_classesmodule.so
/usr/local/lib/python2.7/site-packages/scapy/config.so
/usr/local/lib/python2.7/site-packages/scapy/configmodule.so
/usr/local/lib/python2.7/site-packages/scapy/copy.py
/usr/local/lib/python2.7/site-packages/scapy/copy.pyc
/usr/local/lib/python2.7/site-packages/scapy/copy.so
/usr/local/lib/python2.7/site-packages/scapy/copymodule.so
/usr/local/lib/python2.7/site-packages/scapy/cPickle.py
/usr/local/lib/python2.7/site-packages/scapy/cPickle.pyc
/usr/local/lib/python2.7/site-packages/scapy/cPickle.so
/usr/local/lib/python2.7/site-packages/scapy/cPicklemodule.so
/usr/local/lib/python2.7/site-packages/scapy/dadict.so
/usr/local/lib/python2.7/site-packages/scapy/dadictmodule.so
/usr/local/lib/python2.7/site-packages/scapy/data.so
/usr/local/lib/python2.7/site-packages/scapy/datamodule.so
/usr/local/lib/python2.7/site-packages/scapy/errno.py
/usr/local/lib/python2.7/site-packages/scapy/errno.pyc
/usr/local/lib/python2.7/site-packages/scapy/errno.so
/usr/local/lib/python2.7/site-packages/scapy/errnomodule.so
/usr/local/lib/python2.7/site-packages/scapy/error.so
/usr/local/lib/python2.7/site-packages/scapy/errormodule.so
/usr/local/lib/python2.7/site-packages/scapy/fields.so
/usr/local/lib/python2.7/site-packages/scapy/fieldsmodule.so
/usr/local/lib/python2.7/site-packages/scapy/gzip.py
/usr/local/lib/python2.7/site-packages/scapy/gzip.pyc
/usr/local/lib/python2.7/site-packages/scapy/gzip.so
/usr/local/lib/python2.7/site-packages/scapy/gzipmodule.so
/usr/local/lib/python2.7/site-packages/scapy/itertools.py
/usr/local/lib/python2.7/site-packages/scapy/itertools.pyc
/usr/local/lib/python2.7/site-packages/scapy/itertools.so
/usr/local/lib/python2.7/site-packages/scapy/itertoolsmodule.so
/usr/local/lib/python2.7/site-packages/scapy/layers/__init__.so
/usr/local/lib/python2.7/site-packages/scapy/layers/__init__module.so
/usr/local/lib/python2.7/site-packages/scapy/layers/dot11.so
/usr/local/lib/python2.7/site-packages/scapy/layers/dot11module.so
/usr/local/lib/python2.7/site-packages/scapy/layers/re.py
/usr/local/lib/python2.7/site-packages/scapy/layers/re.pyc
/usr/local/lib/python2.7/site-packages/scapy/layers/re.so
/usr/local/lib/python2.7/site-packages/scapy/layers/remodule.so
/usr/local/lib/python2.7/site-packages/scapy/layers/scapy.py
/usr/local/lib/python2.7/site-packages/scapy/layers/scapy.pyc
/usr/local/lib/python2.7/site-packages/scapy/layers/scapy.so
/usr/local/lib/python2.7/site-packages/scapy/layers/scapymodule.so
/usr/local/lib/python2.7/site-packages/scapy/layers/struct.py
/usr/local/lib/python2.7/site-packages/scapy/layers/struct.pyc
/usr/local/lib/python2.7/site-packages/scapy/layers/struct.so
/usr/local/lib/python2.7/site-packages/scapy/layers/structmodule.so
/usr/local/lib/python2.7/site-packages/scapy/layers/zlib.py
/usr/local/lib/python2.7/site-packages/scapy/layers/zlib.pyc
/usr/local/lib/python2.7/site-packages/scapy/layers/zlib.so
/usr/local/lib/python2.7/site-packages/scapy/layers/zlibmodule.so
/usr/local/lib/python2.7/site-packages/scapy/logging.py
/usr/local/lib/python2.7/site-packages/scapy/logging.pyc
/usr/local/lib/python2.7/site-packages/scapy/logging.so
/usr/local/lib/python2.7/site-packages/scapy/loggingmodule.so
/usr/local/lib/python2.7/site-packages/scapy/math.py
/usr/local/lib/python2.7/site-packages/scapy/math.pyc
/usr/local/lib/python2.7/site-packages/scapy/math.so
/usr/local/lib/python2.7/site-packages/scapy/mathmodule.so
/usr/local/lib/python2.7/site-packages/scapy/os.py
/usr/local/lib/python2.7/site-packages/scapy/os.pyc
/usr/local/lib/python2.7/site-packages/scapy/os.so
/usr/local/lib/python2.7/site-packages/scapy/osmodule.so
/usr/local/lib/python2.7/site-packages/scapy/packet.so
/usr/local/lib/python2.7/site-packages/scapy/packetmodule.so
/usr/local/lib/python2.7/site-packages/scapy/pton_ntop.so
/usr/local/lib/python2.7/site-packages/scapy/pton_ntopmodule.so
/usr/local/lib/python2.7/site-packages/scapy/pyx.py
/usr/local/lib/python2.7/site-packages/scapy/pyx.pyc
/usr/local/lib/python2.7/site-packages/scapy/pyx.so
/usr/local/lib/python2.7/site-packages/scapy/pyxmodule.so
/usr/local/lib/python2.7/site-packages/scapy/random.py
/usr/local/lib/python2.7/site-packages/scapy/random.pyc
/usr/local/lib/python2.7/site-packages/scapy/random.so
/usr/local/lib/python2.7/site-packages/scapy/randommodule.so
/usr/local/lib/python2.7/site-packages/scapy/re.py
/usr/local/lib/python2.7/site-packages/scapy/re.pyc
/usr/local/lib/python2.7/site-packages/scapy/re.so
/usr/local/lib/python2.7/site-packages/scapy/remodule.so
/usr/local/lib/python2.7/site-packages/scapy/scapy.py
/usr/local/lib/python2.7/site-packages/scapy/scapy.pyc
/usr/local/lib/python2.7/site-packages/scapy/scapy.so
/usr/local/lib/python2.7/site-packages/scapy/scapymodule.so
/usr/local/lib/python2.7/site-packages/scapy/select.py
/usr/local/lib/python2.7/site-packages/scapy/select.pyc
/usr/local/lib/python2.7/site-packages/scapy/select.so
/usr/local/lib/python2.7/site-packages/scapy/selectmodule.so
/usr/local/lib/python2.7/site-packages/scapy/sendrecv.so
/usr/local/lib/python2.7/site-packages/scapy/sendrecvmodule.so
/usr/local/lib/python2.7/site-packages/scapy/socket.py
/usr/local/lib/python2.7/site-packages/scapy/socket.pyc
/usr/local/lib/python2.7/site-packages/scapy/socket.so
/usr/local/lib/python2.7/site-packages/scapy/socketmodule.so
/usr/local/lib/python2.7/site-packages/scapy/struct.py
/usr/local/lib/python2.7/site-packages/scapy/struct.pyc
/usr/local/lib/python2.7/site-packages/scapy/struct.so
/usr/local/lib/python2.7/site-packages/scapy/structmodule.so
/usr/local/lib/python2.7/site-packages/scapy/subprocess.py
/usr/local/lib/python2.7/site-packages/scapy/subprocess.pyc
/usr/local/lib/python2.7/site-packages/scapy/subprocess.so
/usr/local/lib/python2.7/site-packages/scapy/subprocessmodule.so
/usr/local/lib/python2.7/site-packages/scapy/supersocket.so
/usr/local/lib/python2.7/site-packages/scapy/supersocketmodule.so
/usr/local/lib/python2.7/site-packages/scapy/sys.py
/usr/local/lib/python2.7/site-packages/scapy/sys.pyc
/usr/local/lib/python2.7/site-packages/scapy/sys.so
/usr/local/lib/python2.7/site-packages/scapy/sysmodule.so
/usr/local/lib/python2.7/site-packages/scapy/themes.so
/usr/local/lib/python2.7/site-packages/scapy/themesmodule.so
/usr/local/lib/python2.7/site-packages/scapy/time.py
/usr/local/lib/python2.7/site-packages/scapy/time.pyc
/usr/local/lib/python2.7/site-packages/scapy/time.so
/usr/local/lib/python2.7/site-packages/scapy/timemodule.so
/usr/local/lib/python2.7/site-packages/scapy/traceback.py
/usr/local/lib/python2.7/site-packages/scapy/traceback.pyc
/usr/local/lib/python2.7/site-packages/scapy/traceback.so
/usr/local/lib/python2.7/site-packages/scapy/tracebackmodule.so
/usr/local/lib/python2.7/site-packages/scapy/types.py
/usr/local/lib/python2.7/site-packages/scapy/types.pyc
/usr/local/lib/python2.7/site-packages/scapy/types.so
/usr/local/lib/python2.7/site-packages/scapy/typesmodule.so
/usr/local/lib/python2.7/site-packages/scapy/utils.so
/usr/local/lib/python2.7/site-packages/scapy/utils6.so
/usr/local/lib/python2.7/site-packages/scapy/utils6module.so
/usr/local/lib/python2.7/site-packages/scapy/utilsmodule.so
/usr/local/lib/python2.7/site-packages/scapy/volatile.so
/usr/local/lib/python2.7/site-packages/scapy/volatilemodule.so
/usr/local/lib/python2.7/site-packages/scapy/warnings.py
/usr/local/lib/python2.7/site-packages/scapy/warnings.pyc
/usr/local/lib/python2.7/site-packages/scapy/warnings.so
/usr/local/lib/python2.7/site-packages/scapy/warningsmodule.so
/usr/local/lib/python2.7/site-packages/scapy/zlib.py
/usr/local/lib/python2.7/site-packages/scapy/zlib.pyc
/usr/local/lib/python2.7/site-packages/scapy/zlib.so
/usr/local/lib/python2.7/site-packages/scapy/zlibmodule.so
╭─jivanov@irony ~
╰─$ ls -lah /usr/local/lib/python2.7/site-packages/scapy/
total 1923
-rw-r--r-- 1 root wheel 2.4K Oct 18 12:56 __init__.py
-rw-r--r-- 1 root wheel 2.1K Mar 1 21:34 __init__.pyc
drwxr-xr-x 8 root wheel 65B Mar 1 21:34 .
drwxr-xr-x 284 root wheel 398B Mar 7 20:05 ..
-rw-r--r-- 1 root wheel 1.1K Oct 18 12:56 all.py
-rw-r--r-- 1 root wheel 1.2K Mar 1 21:34 all.pyc
-rw-r--r-- 1 root wheel 4.0K Oct 18 12:56 ansmachine.py
-rw-r--r-- 1 root wheel 5.5K Mar 1 21:34 ansmachine.pyc
drwxr-xr-x 3 root wheel 19B Mar 1 21:34 arch
-rw-r--r-- 1 root wheel 3.2K Oct 18 12:56 as_resolvers.py
-rw-r--r-- 1 root wheel 4.7K Mar 1 21:34 as_resolvers.pyc
drwxr-xr-x 2 root wheel 10B Mar 1 21:34 asn1
-rw-r--r-- 1 root wheel 21K Oct 18 12:56 asn1fields.py
-rw-r--r-- 1 root wheel 29K Mar 1 21:34 asn1fields.pyc
-rw-r--r-- 1 root wheel 981B Oct 18 12:56 asn1packet.py
-rw-r--r-- 1 root wheel 1.6K Mar 1 21:34 asn1packet.pyc
-rw-r--r-- 1 root wheel 27K Oct 18 12:56 automaton.py
-rw-r--r-- 1 root wheel 33K Mar 1 21:34 automaton.pyc
-rw-r--r-- 1 root wheel 4.2K Oct 18 12:56 autorun.py
-rw-r--r-- 1 root wheel 5.5K Mar 1 21:34 autorun.pyc
-rw-r--r-- 1 root wheel 8.5K Oct 18 12:56 base_classes.py
-rw-r--r-- 1 root wheel 11K Mar 1 21:34 base_classes.pyc
-rw-r--r-- 1 root wheel 13K Oct 18 12:56 config.py
-rw-r--r-- 1 root wheel 22K Mar 1 21:34 config.pyc
drwxr-xr-x 2 root wheel 82B Mar 1 21:34 contrib
-rw-r--r-- 1 root wheel 3.0K Oct 18 12:56 dadict.py
-rw-r--r-- 1 root wheel 5.5K Mar 1 21:34 dadict.pyc
-rw-r--r-- 1 root wheel 6.0K Oct 18 12:56 data.py
-rw-r--r-- 1 root wheel 6.9K Mar 1 21:34 data.pyc
-rw-r--r-- 1 root wheel 1.9K Oct 18 12:56 error.py
-rw-r--r-- 1 root wheel 2.5K Mar 1 21:34 error.pyc
-rw-r--r-- 1 root wheel 34K Oct 18 12:56 fields.py
-rw-r--r-- 1 root wheel 63K Mar 1 21:34 fields.pyc
drwxr-xr-x 3 root wheel 77B Mar 1 21:34 layers
-rw-r--r-- 1 root wheel 12K Oct 18 12:56 main.py
-rw-r--r-- 1 root wheel 12K Mar 1 21:34 main.pyc
drwxr-xr-x 2 root wheel 12B Mar 1 21:34 modules
-rw-r--r-- 1 root wheel 49K Oct 18 12:56 packet.py
-rw-r--r-- 1 root wheel 53K Mar 1 21:34 packet.pyc
-rw-r--r-- 1 root wheel 16K Oct 18 12:56 pipetool.py
-rw-r--r-- 1 root wheel 27K Mar 1 21:34 pipetool.pyc
-rw-r--r-- 1 root wheel 21K Oct 18 12:56 plist.py
-rw-r--r-- 1 root wheel 23K Mar 1 21:34 plist.pyc
-rw-r--r-- 1 root wheel 3.4K Oct 18 12:56 pton_ntop.py
-rw-r--r-- 1 root wheel 2.4K Mar 1 21:34 pton_ntop.pyc
-rw-r--r-- 1 root wheel 5.3K Oct 18 12:56 route.py
-rw-r--r-- 1 root wheel 5.7K Mar 1 21:34 route.pyc
-rw-r--r-- 1 root wheel 9.9K Oct 18 12:56 route6.py
-rw-r--r-- 1 root wheel 9.8K Mar 1 21:34 route6.pyc
-rw-r--r-- 1 root wheel 3.3K Oct 18 12:56 scapypipes.py
-rw-r--r-- 1 root wheel 7.1K Mar 1 21:34 scapypipes.pyc
-rw-r--r-- 1 root wheel 25K Oct 18 12:56 sendrecv.py
-rw-r--r-- 1 root wheel 22K Mar 1 21:34 sendrecv.pyc
-rw-r--r-- 1 root wheel 4.5K Oct 18 12:56 supersocket.py
-rw-r--r-- 1 root wheel 6.9K Mar 1 21:34 supersocket.pyc
-rw-r--r-- 1 root wheel 10K Oct 18 12:56 themes.py
-rw-r--r-- 1 root wheel 10K Mar 1 21:34 themes.pyc
drwxr-xr-x 2 root wheel 8B Mar 1 21:34 tools
-rw-r--r-- 1 root wheel 31K Oct 18 12:56 utils.py
-rw-r--r-- 1 root wheel 41K Mar 1 21:34 utils.pyc
-rw-r--r-- 1 root wheel 27K Oct 18 12:56 utils6.py
-rw-r--r-- 1 root wheel 31K Mar 1 21:34 utils6.pyc
-rw-r--r-- 1 root wheel 5B Oct 18 12:57 VERSION
-rw-r--r-- 1 root wheel 21K Oct 18 12:56 volatile.py
-rw-r--r-- 1 root wheel 36K Mar 1 21:34 volatile.pyc
╭─jivanov@irony ~
╰─$ ls -lah /usr/local/lib/python2.7/site-packages/scapy/arch
total 371
-rw-r--r-- 1 root wheel 3.1K Oct 18 12:56 __init__.py
-rw-r--r-- 1 root wheel 3.6K Mar 1 21:34 __init__.pyc
drwxr-xr-x 3 root wheel 19B Mar 1 21:34 .
drwxr-xr-x 8 root wheel 65B Mar 1 21:34 ..
-rw-r--r-- 1 root wheel 480B Oct 18 12:56 common.py
-rw-r--r-- 1 root wheel 637B Mar 1 21:34 common.pyc
-rw-r--r-- 1 root wheel 737B Oct 18 12:56 consts.py
-rw-r--r-- 1 root wheel 740B Mar 1 21:34 consts.pyc
-rw-r--r-- 1 root wheel 18K Oct 18 12:56 linux.py
-rw-r--r-- 1 root wheel 18K Mar 1 21:34 linux.pyc
-rw-r--r-- 1 root wheel 24K Oct 18 12:56 pcapdnet.py
-rw-r--r-- 1 root wheel 26K Mar 1 21:34 pcapdnet.pyc
-rw-r--r-- 1 root wheel 361B Oct 18 12:56 solaris.py
-rw-r--r-- 1 root wheel 324B Mar 1 21:34 solaris.pyc
-rw-r--r-- 1 root wheel 11K Oct 18 12:56 unix.py
-rw-r--r-- 1 root wheel 7.4K Mar 1 21:34 unix.pyc
drwxr-xr-x 2 root wheel 6B Mar 1 21:34 windows
-rw-r--r-- 1 root wheel 28K Oct 18 12:56 winpcapy.py
-rw-r--r-- 1 root wheel 12K Mar 1 21:34 winpcapy.pyc
There you have it. Scapy is installed, it works fine, it's installed to the appropriate path, and if you want the truss output then you can see it in it's entirety here: https://www.dropbox.com/s/zthayx3rvd957xs/truss.pyrit.20170307a?dl=1
For those not familiar with reading system call traces, not all errors mean failures which is why I provided the entire output so there can be context around it. Scapy can be run via CLI, it can be imported via python, there is absolutely no reason that pyrit should fail if scapy is installed and functional in accordance to how Python is structured.
I have wasted too much of my time on this. Do what you will with the information I have but I am going to find a way to unsubscribe from this thread. I said I was done with this junk and I went back on my word but I am going to follow-through with it now.
Alright guys, I will end this. Deleted all useless comments, will reopen issue for future reference (as is unsolved).
Probably related #38 #513 #473
This is not scapy issue. Run this command to detect missed python modules:
python -c 'import cpyrit.pckttools'
I was experiencing the same issue. I ran conda install --channel https://conda.anaconda.org/pdrops scapy
and it fixed it.
Maybe this is a problem with how libdnet is called - i.e., dumbnet, dnet, etc., there are many different wrappers floating around. I fixed the issue insofar as scapy 2.3.3 is concerned in the command pyrit -r DUMP.cap analyze
by brew install libdnet
and then:
sudo ln -s /usr/local/Cellar/libdnet/1.12/lib/python2.7/site-packages/dnet.so /Library/Python/2.7/site-packages/
sudo ln -s /usr/local/Cellar/libdnet/1.12/lib/python2.7/site-packages/dnet-1.12-py2.7.egg-info /Library/Python/2.7/site-packages/
I use mac's builtin python; I do not use homebrew's python, which is not even installed. Also, I installed Pyrit via git clone
method instead of using pip. If you have any version of libdnet installed in /Library/Python/2.7/site-packages/, you'd have to remove that first to make use of the homebrew-installed version.
@JPaulMora maybe test this workaround and close the issue?
what is the solution now ?
I solved scapy issue, installing python2-scapy...
@sersajar what distro are you using? I tried to install python2-scapy but it not solved the problem...
Any workaround to use the 'analyze' function?
When i use 'analyze' function it return:
Pyrit 0.5.0 (C) 2008-2011 Lukas Lueg - 2015 John Mora
https://github.com/JPaulMora/Pyrit
This code is distributed under the GNU General Public License v3+
Scapy 2.x is required to use Pyrit's analyze/attack functions but seems to be unavailable.
So, i install python2-scapy package and i get a different error:
Pyrit 0.5.0 (C) 2008-2011 Lukas Lueg - 2015 John Mora
https://github.com/JPaulMora/Pyrit
This code is distributed under the GNU General Public License v3+
Traceback (most recent call last):
File "/usr/bin/pyrit", line 6, in <module>
pyrit_cli.Pyrit_CLI().initFromArgv()
File "/usr/lib/python2.7/site-packages/pyrit_cli.py", line 117, in initFromArgv
func(self, **options)
File "/usr/lib/python2.7/site-packages/pyrit_cli.py", line 160, in new_f
import cpyrit.pckttools
File "/usr/lib/python2.7/site-packages/cpyrit/pckttools.py", line 132, in <module>
scapy.packet.bind_layers(scapy.layers.l2.EAPOL, EAPOL_Key, type=3)
AttributeError: 'module' object has no attribute 'EAPOL'
I have no idea how to solve it. I am using Arch Linux.
Aditional info about package versions installeds on my system:
community/python-scapy 2.4.0-1 [installed]
Powerful interactive packet manipulation program written in Python (library)
community/python2-scapy 2.4.0-1 [installed]
Powerful interactive packet manipulation program written in Python (library)
community/scapy 2.4.0-1 [installed]
Powerful interactive packet manipulation program written in Python (tools)
Try to re-clone the pyrit repo-. move to the directory.
$# sudo python install setup.py
$# sudo pip install scapy
it works for me on Debian-9.11(stretch)
Im using Tails Linux (Debian)
root@amnesia:~# pyrit -r /root/capture-01.cap analyse
Pyrit 0.5.1 (C) 2008-2011 Lukas Lueg - 2015 John Mora
[https://github.com/JPaulMora/Pyrit]
This code is distributed under the GNU General Public License v3+
Scapy 2.x is required to use Pyrit's analyze/attack functions but seems to be unavailable.
Im using Tails Linux (Debian)
root@amnesia:~#
pyrit -r /root/capture-01.cap analyse
Pyrit 0.5.1 (C) 2008-2011 Lukas Lueg - 2015 John Mora [https://github.com/JPaulMora/Pyrit] This code is distributed under the GNU General Public License v3+Scapy 2.x is required to use Pyrit's analyze/attack functions but seems to be unavailable.
I know this is old topic but I was just trying Pyrit, I had this same issue and installing using python 2 worked for me on ArchLinux sudo -H pip2 install scapy==2.3.2
This issue has occurred with Pyrit 0.4.0 as well as the latest from github as of minutes ago.
The first time I ran into this error, I installed
scapy
:But
Although
scapy
is clearly installed:And for my operating system: