Pyrit icon indicating copy to clipboard operation
Pyrit copied to clipboard

pyrit analyze has an error

Open zzjjbb opened this issue 6 years ago • 2 comments

I used a self-compiled, clone with git version of pyrit according to the install tutorial. When I run "pyrit benchmark" or "pyrit list_cores", it works well and give me correct results. However, when I run "pyrit -r xxx.cap analyze", it says

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 'xxx.cap' (1/1)...
Traceback (most recent call last):
  File "/usr/local/bin/pyrit", line 6, in <module>
    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 166, in new_f
    f(*args, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/pyrit_cli.py", line 466, in analyze
    parser = self._getParser(capturefile)
  File "/usr/local/lib/python2.7/dist-packages/pyrit_cli.py", line 182, in _getParser
    parser.parse_pcapdevice(dev)
  File "/usr/local/lib/python2.7/dist-packages/cpyrit/pckttools.py", line 714, in parse_pcapdevice
    self.parse_packet(pckt)
  File "/usr/local/lib/python2.7/dist-packages/cpyrit/pckttools.py", line 732, in parse_packet
    self._add_ap(dot11_pckt.addr2, dot11_pckt)
  File "/usr/local/lib/python2.7/dist-packages/cpyrit/pckttools.py", line 660, in _add_ap
    essid = self._find_ssid(pckt)
  File "/usr/local/lib/python2.7/dist-packages/cpyrit/pckttools.py", line 652, in _find_ssid
    if elt_pckt.isFlagSet('ID', 'SSID') \
  File "/usr/local/lib/python2.7/dist-packages/cpyrit/pckttools.py", line 87, in isFlagSet
    return (1 << field.names.index([value])) & self.__getattr__(name) != 0
AttributeError: 'ByteField' object has no attribute 'names'"

When I use the binary version in kali and do the same thing, it works fine. By the way, I'm working on Ubuntu 16.04 when the problem occured.

zzjjbb avatar Jan 18 '19 00:01 zzjjbb

Have the same issue, Ubuntu 18.04

justinvzyl avatar May 11 '19 00:05 justinvzyl

Duplicate of #565

The problem comes from scapy's update. And it's solved by downgrading Scapy:

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

Originally posted by @ShellBear in https://github.com/JPaulMora/Pyrit/issues/565#issuecomment-381366574

pavonis9 avatar Aug 17 '19 13:08 pavonis9