hash3liZer / WiFiBroot

A Wireless (WPA/WPA2) Pentest/Cracking tool. Captures & Crack 4-way handshake and PMKID key. Also, supports a deauthentication/jammer mode for stress testing
GNU General Public License v3.0
969 stars 176 forks source link

Python 3 compatibility issues #16

Closed cclauss closed 5 years ago

cclauss commented 5 years ago

flake8 testing of https://github.com/hash3liZer/WiFiBroot on Python 3.7.1

$ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

./wifibroot.py:197:12: E999 SyntaxError: invalid syntax
        print "\n"+tabulate(tabulator__, headers=__HEADERS)+"\n"
           ^
./pull.py:161:20: E999 SyntaxError: invalid syntax
        print "%s[*]%s %s" % (self.BOLD+self.YELLOW, self.END, statement)
                   ^
./wireless/shifter.py:153:59: E999 SyntaxError: invalid syntax
        if pkt.haslayer(Dot11) and pkt.getlayer(Dot11).type == 2L and not pkt.haslayer(EAPOL):
                                                          ^
./wireless/cracker.py:167:12: F821 undefined name 'xrange'
        for c in xrange(0, len(src), length):
           ^
./wireless/captures.py:176:41: E999 SyntaxError: invalid syntax
                self.pull.right("PMK =>"); print self.hexdump(_pmk)
                                        ^
./wireless/sniper.py:63:59: E999 SyntaxError: invalid syntax
        if pkt.haslayer(Dot11) and pkt.getlayer(Dot11).type == 2L and not pkt.haslayer(EAPOL):
                                                          ^
./wireless/connector.py:51:21: E999 SyntaxError: invalid syntax
        except ImportError, e:
                    ^
./wireless/pmkid.py:162:19: E999 SyntaxError: invalid syntax
        except Exception, e:
                  ^
./utils/tabulater__.py:19:18: F821 undefined name 'long'
    _long_type = long
                 ^
./utils/tabulater__.py:21:18: F821 undefined name 'unicode'
    _text_type = unicode
                 ^
./utils/tabulater__.py:25:30: F821 undefined name 'file'
        return isinstance(f, file)
                             ^
7     E999 SyntaxError: invalid syntax
4     F821 undefined name 'long'
11

E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.

hash3liZer commented 5 years ago

Just merged your pull request. Yes, it is built with Python 2. So, only python 2 is supported.

cclauss commented 5 years ago

144 days until Python 2 end of life.

hash3liZer commented 5 years ago

Yes, i started this project before that. And eventually, had to left this out after scapy release 2.4.2. Recently, after some support tickets and questions for improvements, I am already working for the newer version, supporting the latest scapy release and Python 3.

hash3liZer commented 5 years ago

Closing it now.