Bug 1498316 - AttributeError: 'BitEnumField' object has no attribute 'names'
Summary: AttributeError: 'BitEnumField' object has no attribute 'names'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pyrit
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-04 00:13 UTC by strasharo2000
Modified: 2018-03-22 16:48 UTC (History)
1 user (show)

Fixed In Version: pyrit-0.5.1-0.1.git692fbe9.fc27 pyrit-0.5.1-0.1.git692fbe9.fc26
Clone Of:
Environment:
Last Closed: 2018-02-14 17:29:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 500 0 None None None 2017-10-04 00:13:39 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.