--crack option provides commands to crack a handshake

Requested in #15
This commit is contained in:
derv82
2017-05-14 23:07:34 -04:00
parent 0a6e0d8ee7
commit a08dbf99c5
5 changed files with 107 additions and 3 deletions

View File

@@ -41,6 +41,13 @@ class CrackResult(object):
Color.pl('{+} saved crack result to {C}%s{W} ({G}%d total{W})'
% (name, len(json)))
@classmethod
def load_all(cls):
if not os.path.exists(cls.cracked_file): return []
with open(cls.cracked_file, "r") as json_file:
json = loads(json_file.read())
return json
@staticmethod
def load(json):
''' Returns an instance of the appropriate object given a json instance '''