Cleaner JSON key handling in metamask2hashcat

Co-authored-by: kgolawski <konrad.golawski@gmail.com>
pull/3952/head
its5Q 2 months ago committed by GitHub
parent 205e7f6e71
commit 55406d8342
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -54,11 +54,10 @@ def metamask_parser(file, shortdata):
if isMobile is False:
if 'keyMetadata' in j and 'params' in j['keyMetadata'] and 'iterations' in j['keyMetadata']['params']:
try:
iter_count = j['keyMetadata']['params']['iterations']
else:
iter_count = 10000
except KeyError:
iter_count = 10_000
if((len(j['data']) > 3000) or shortdata):
data_bin = base64.b64decode(j['data'])
# TODO limit data to 16 bytes, we only check the first block of data, so we don't need more data.

Loading…
Cancel
Save