Crack results can be saved or loaded.

Although they're not saved or loaded at this time. :(
Also, BANNER!
This commit is contained in:
derv82
2015-06-04 00:52:36 -07:00
parent 9b7cc7fb8d
commit 1078a4d5de
13 changed files with 223 additions and 23 deletions

View File

@@ -1,27 +1,40 @@
#!/usr/bin/python
from Color import Color
from CrackResult import CrackResult
import time
class CrackResultWEP(object):
class CrackResultWEP(CrackResult):
def __init__(self, bssid, essid, hex_key, ascii_key):
self.result_type = 'WEP'
self.bssid = bssid
self.essid = essid
self.hex_key = hex_key
self.ascii_key = ascii_key
self.time = time.time()
super(CrackResultWEP, self).__init__()
def dump(self):
if self.essid:
Color.pl('{+} ESSID: {C}%s{W}' % self.essid)
Color.pl('{+} BSSID: {C}%s{W}' % self.bssid)
Color.pl('{+} Encryption: {C}WEP{W}')
Color.pl('{+} Encryption: {C}%s{W}' % self.result_type)
Color.pl('{+} Hex Key: {G}%s{W}' % self.hex_key)
if self.ascii_key:
Color.pl('{+} Ascii Key: {G}%s{W}' % self.ascii_key)
def to_dict(self):
return {
'type' : self.result_type,
'date' : self.date,
'essid' : self.essid,
'bssid' : self.bssid,
'hex_key' : self.hex_key,
'ascii_key' : self.ascii_key
}
if __name__ == '__main__':
crw = CrackResultWEP('AA:BB:CC:DD:EE:FF', 'Test Router', '00:01:02:03:04', 'abcde')
crw.dump()
crw.save()