Bug 1498316

Summary: AttributeError: 'BitEnumField' object has no attribute 'names'
Product: [Fedora] Fedora Reporter: strasharo2000
Component: pyritAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pyrit-0.5.1-0.1.git692fbe9.fc27 pyrit-0.5.1-0.1.git692fbe9.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-14 17:29:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description strasharo2000 2017-10-04 00:13:40 UTC
Description of problem:
pyrit produces the following exception while trying to analyze a cap 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+

Parsing file '/usr/share/doc/aircrack-ng/wpa2-psk-linksys.cap' (1/1)...
Traceback (most recent call last):
  File "/bin/pyrit", line 6, in <module>
    pyrit_cli.Pyrit_CLI().initFromArgv()
  File "/usr/lib64/python2.7/site-packages/pyrit_cli.py", line 117, in initFromArgv
    func(self, **options)
  File "/usr/lib64/python2.7/site-packages/pyrit_cli.py", line 166, in new_f
    f(*args, **kwds)
  File "/usr/lib64/python2.7/site-packages/pyrit_cli.py", line 466, in analyze
    parser = self._getParser(capturefile)
  File "/usr/lib64/python2.7/site-packages/pyrit_cli.py", line 182, in _getParser
    parser.parse_pcapdevice(dev)
  File "/usr/lib64/python2.7/site-packages/cpyrit/pckttools.py", line 697, in parse_pcapdevice
    self.parse_packet(pckt)
  File "/usr/lib64/python2.7/site-packages/cpyrit/pckttools.py", line 710, in parse_packet
    if dot11_pckt.isFlagSet('type', 'Control'):
  File "/usr/lib64/python2.7/site-packages/cpyrit/pckttools.py", line 67, in isFlagSet
    return (1 << field.names.index([value])) & self.__getattr__(name) != 0
AttributeError: 'BitEnumField' object has no attribute 'names'


Version-Release number of selected component (if applicable):
Version     : 0.5.0
Release     : 1.fc26


How reproducible:
Always

Steps to Reproduce:
1. Run pyrit against a sample cap file provided by aircrack-ng
pyrit -r /usr/share/doc/aircrack-ng/wpa2-psk-linksys.cap analyze



Actual results:
[root@host ~]# pyrit -r /usr/share/doc/aircrack-ng/wpa2-psk-linksys.cap analyze
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+

Parsing file '/usr/share/doc/aircrack-ng/wpa2-psk-linksys.cap' (1/1)...
Traceback (most recent call last):
  File "/bin/pyrit", line 6, in <module>
    pyrit_cli.Pyrit_CLI().initFromArgv()
  File "/usr/lib64/python2.7/site-packages/pyrit_cli.py", line 117, in initFromArgv
    func(self, **options)
  File "/usr/lib64/python2.7/site-packages/pyrit_cli.py", line 166, in new_f
    f(*args, **kwds)
  File "/usr/lib64/python2.7/site-packages/pyrit_cli.py", line 466, in analyze
    parser = self._getParser(capturefile)
  File "/usr/lib64/python2.7/site-packages/pyrit_cli.py", line 182, in _getParser
    parser.parse_pcapdevice(dev)
  File "/usr/lib64/python2.7/site-packages/cpyrit/pckttools.py", line 697, in parse_pcapdevice
    self.parse_packet(pckt)
  File "/usr/lib64/python2.7/site-packages/cpyrit/pckttools.py", line 710, in parse_packet
    if dot11_pckt.isFlagSet('type', 'Control'):
  File "/usr/lib64/python2.7/site-packages/cpyrit/pckttools.py", line 67, in isFlagSet
    return (1 << field.names.index([value])) & self.__getattr__(name) != 0
AttributeError: 'BitEnumField' object has no attribute 'names'


Expected results:
It should produce a proper analysis of the supplied pcap file.

Additional info:
The bug was already discussed here and resolved in the upstream available ot Github:
https://github.com/JPaulMora/Pyrit/issues/500
Pulling the source from Github will resolve the issue.

Comment 1 strasharo2000 2018-02-04 10:22:57 UTC
The issue is still present in the package for Fedora 27. Can we just have an update from upstream in order to resolve this issue? The fix is confirmed to work.

Comment 2 Fedora Update System 2018-02-04 12:06:54 UTC
pyrit-0.5.1-0.1.git692fbe9.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-8e0f637551

Comment 3 Fedora Update System 2018-02-04 12:07:01 UTC
pyrit-0.5.1-0.1.git692fbe9.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a2c04fb4d2

Comment 4 Fedora Update System 2018-02-04 20:02:47 UTC
pyrit-0.5.1-0.1.git692fbe9.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a2c04fb4d2

Comment 5 Fedora Update System 2018-02-04 20:18:34 UTC
pyrit-0.5.1-0.1.git692fbe9.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-8e0f637551

Comment 6 Fedora Update System 2018-02-14 17:29:01 UTC
pyrit-0.5.1-0.1.git692fbe9.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2018-03-22 16:48:04 UTC
pyrit-0.5.1-0.1.git692fbe9.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.