I experienced the following error after upgrading my Kali distribution when I tried to run Pyrit:
Code:
Traceback (most recent call last):
File "/usr/bin/pyrit", line 6, in <module>
pyrit_cli.Pyrit_CLI().initFromArgv()
File "/usr/lib/python2.7/dist-packages/pyrit_cli.py", line 115, in initFromArgv
func(self, **options)
File "/usr/lib/python2.7/dist-packages/pyrit_cli.py", line 163, in new_f
f(*args, **kwds)
File "/usr/lib/python2.7/dist-packages/pyrit_cli.py", line 447, in analyze
parser = self._getParser(capturefile)
File "/usr/lib/python2.7/dist-packages/pyrit_cli.py", line 179, in _getParser
parser.parse_pcapdevice(dev)
File "/usr/lib/python2.7/dist-packages/cpyrit/pckttools.py", line 601, in parse_pcapdevice
self.parse_packet(pckt)
File "/usr/lib/python2.7/dist-packages/cpyrit/pckttools.py", line 614, in parse_packet
if dot11_pckt.isFlagSet('type', 'Control'):
File "/usr/lib/python2.7/dist-packages/cpyrit/pckttools.py", line 66, in isFlagSet
return (1 << field.names.index([value])) & self.__getattr__(name) != 0
AttributeError: 'BitEnumField' object has no attribute 'names'
I was able to fix this issue by uninstalling Scapy 2.3.3 that was included in the upgrade and downgrading to Scapy 2.3.2.
You can download Scapy 2.3.2 at https://github.com/secdev/scapy/archive/v2.3.2.zip. Unpack and run the following in a terminal window in the same directory you unpacked the files in (that contains the file setup.py):
Code:
sudo python setup.py install
After doing this Pyrit ran fine.
Hope this helps.
G3Cube