Support for Python3

That was fun.
This commit is contained in:
derv82
2018-03-31 23:02:00 -04:00
parent 1ad17472b2
commit 3eddcaa59f
23 changed files with 103 additions and 63 deletions

View File

@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
from ..util.process import Process
from ..util.input import xrange
from ..config import Configuration
import os
@@ -80,17 +81,17 @@ if __name__ == '__main__':
Configuration.initialize(False)
ivs_file = 'tests/files/wep-crackable.ivs'
print "Running aircrack on %s ..." % ivs_file
print("Running aircrack on %s ..." % ivs_file)
aircrack = Aircrack(ivs_file)
while aircrack.is_running():
sleep(1)
assert aircrack.is_cracked(), "Aircrack should have cracked %s" % ivs_file
print "aircrack process completed."
print("aircrack process completed.")
(hexkey, asciikey) = aircrack.get_key_hex_ascii()
print "aircrack found HEX key: (%s) and ASCII key: (%s)" % (hexkey, asciikey)
print("aircrack found HEX key: (%s) and ASCII key: (%s)" % (hexkey, asciikey))
assert hexkey == '75:6E:63:6C:65', 'hexkey was "%s", expected "75:6E:63:6C:65"' % hexkey
assert asciikey == 'uncle', 'asciikey was "%s", expected "uncle"' % asciikey