Pyrit icon indicating copy to clipboard operation
Pyrit copied to clipboard

AttributeError: 'module' object has no attribute 'EAPOL'

Open Shatterblade opened this issue 7 years ago • 7 comments

I get this

Traceback (most recent call last):
  File "/usr/local/bin/pyrit", line 6, in <module>
    pyrit_cli.Pyrit_CLI().initFromArgv()
  File "/Library/Python/2.7/site-packages/pyrit_cli.py", line 117, in initFromArgv
    func(self, **options)
  File "/Library/Python/2.7/site-packages/pyrit_cli.py", line 160, in new_f
    import cpyrit.pckttools
  File "/Library/Python/2.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'

when I try to run attack_db on a capture file. What am I doing wrong? (OS: MacOS 10.13.2, pyrit installed from cloning the GitHub, scapy installed from sourceforge (not pip))

Shatterblade avatar Feb 02 '18 03:02 Shatterblade

Same here but on FreeBSD 11.1, trying to analyze a packet capture file:

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 "/root/.pyenv/versions/2.7.14/bin/pyrit", line 6, in <module>
    pyrit_cli.Pyrit_CLI().initFromArgv()
  File "/root/.pyenv/versions/2.7.14/lib/python2.7/site-packages/pyrit_cli.py", line 117, in initFromArgv
    func(self, **options)
  File "/root/.pyenv/versions/2.7.14/lib/python2.7/site-packages/pyrit_cli.py", line 160, in new_f
    import cpyrit.pckttools
  File "/root/.pyenv/versions/2.7.14/lib/python2.7/site-packages/cpyrit/pckttools.py", line 121, in <module>
    scapy.packet.bind_layers(scapy.layers.l2.EAPOL, EAPOL_Key, type=3)
AttributeError: 'module' object has no attribute 'EAPOL'

Pyrit, scapy and dnet all compiled and installed from source.

herrbischoff avatar Mar 12 '18 13:03 herrbischoff

Same over here on Arch with Pyrit 0.5.1. Doesn't happen just with attack_db, also with other commands such as analyze.

ghost avatar Mar 31 '18 13:03 ghost

The problem comes from scapy's update. I personnaly solved the problem by downgrading scapy using pip. Here an example command:

wget -O /tmp/scapy2.3.2.tar.gz https://pypi.python.org/packages/6d/72/c055abd32bcd4ee6b36ef8e9ceccc2e242dea9b6c58fdcf2e8fd005f7650/scapy-2.3.2.tar.gz; sudo pip2 install /tmp/scapy2.3.2.tar.gz

shellbear avatar Apr 14 '18 22:04 shellbear

The problem comes from scapy's update. I personnaly solved the problem by downgrading scapy using pip.

Just said in other thread, it does not work for me....

sersajar avatar May 06 '18 09:05 sersajar

Shellbear's script didn't work for me due to a 404 error. Here's how I got it working.....

In a browser go to: https://pypi.python.org/packages/6d/72/c055abd32bcd4ee6b36ef8e9ceccc2e242dea9b6c58fdcf2e8fd005f7650/scapy-2.3.2.tar.gz

This will download the scapy gzip

In a terminal: "pip2 install path_to_downloaded_file"

and then re-run your pyrit command: "pyrite -r path_to_.cap_file analyze"

dare2netsec avatar May 23 '18 18:05 dare2netsec

pip show scapy Name: scapy Version: 2.4.0

pyrit -r archivo.cap 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+

Traceback (most recent call last): File "/usr/local/bin/pyrit", line 6, in pyrit_cli.Pyrit_CLI().initFromArgv() File "/usr/local/lib/python2.7/dist-packages/pyrit_cli.py", line 117, in initFromArgv func(self, **options) File "/usr/local/lib/python2.7/dist-packages/pyrit_cli.py", line 160, in new_f import cpyrit.pckttools File "/usr/local/lib/python2.7/dist-packages/cpyrit/pckttools.py", line 132, in scapy.packet.bind_layers(scapy.layers.l2.EAPOL, EAPOL_Key, type=3) AttributeError: 'module' object has no attribute 'EAPOL'

downgrading to v2.3.2 work for me

wget -v https://github.com/secdev/scapy/archive/v2.3.2.tar.gz pip install v2.3.2.tar.gz

pyrit -r archivo.cap 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 'archivo.cap' (1/1)... Parsed 1965 packets (1965 802.11-packets), got 1 AP(s)

#1: AccessPoint 08:6e:0a:01:1a:7e ('essid'): #1: Station 7c:1c:4e:81:13:10 #2: Station 50:c8:e5:da:eb:19, 81 handshake(s): #1: HMAC_SHA1_AES, bad, spread 1

thank so much! :+1:

MrPessimist avatar May 27 '18 04:05 MrPessimist

thanks a lot, used @dare2netsec short and easy fix...

downloaded that file, installed it with pip2, and reran my command, fixed it all in without having to uninstall anything or do anything other than pip2 install that version of scapy..

thanks sir!

faultwipecomputing avatar Jul 09 '18 05:07 faultwipecomputing