File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -317,18 +317,17 @@ def storeHashesToFile(attack_dict):
317317 with open (filename , "w+" ) as f :
318318 for user , hashes in attack_dict .items ():
319319 for hash_ in hashes :
320- if not hash_ or hash_ == NULL or not hashRecognition (hash_ ):
321- continue
322-
323- item = None
324- if user and not user .startswith (DUMMY_USER_PREFIX ):
325- item = "%s:%s\n " % (user .encode (UNICODE_ENCODING ), hash_ .encode (UNICODE_ENCODING ))
326- else :
327- item = "%s\n " % hash_ .encode (UNICODE_ENCODING )
320+ hash_ = hash_ .split ()[0 ] if hash_ else hash_
321+ if hash_ and hash_ != NULL and hashRecognition (hash_ ):
322+ item = None
323+ if user and not user .startswith (DUMMY_USER_PREFIX ):
324+ item = "%s:%s\n " % (user .encode (UNICODE_ENCODING ), hash_ .encode (UNICODE_ENCODING ))
325+ else :
326+ item = "%s\n " % hash_ .encode (UNICODE_ENCODING )
328327
329- if item and item not in items :
330- f .write (item )
331- items .add (item )
328+ if item and item not in items :
329+ f .write (item )
330+ items .add (item )
332331
333332def attackCachedUsersPasswords ():
334333 if kb .data .cachedUsersPasswords :
You can’t perform that action at this time.
0 commit comments