Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cf8e5d5

Browse files
committed
Minor cleanup
1 parent c5ae967 commit cf8e5d5

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

lib/utils/hash.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,9 @@ def attackCachedUsersPasswords():
340340

341341
for user in kb.data.cachedUsersPasswords.keys():
342342
for i in xrange(len(kb.data.cachedUsersPasswords[user])):
343-
_ = kb.data.cachedUsersPasswords[user][i]
344-
if _:
345-
hash_ = _.split()[0].lower()
346-
if hash_ in lut and "clear-text password" not in _:
347-
kb.data.cachedUsersPasswords[user][i] += "%s clear-text password: %s" % ('\n' if kb.data.cachedUsersPasswords[user][i][-1] != '\n' else '', lut[hash_])
343+
value = kb.data.cachedUsersPasswords[user][i].lower()
344+
if value in lut and "clear-text password" not in value:
345+
kb.data.cachedUsersPasswords[user][i] += "%s clear-text password: %s" % ('\n' if kb.data.cachedUsersPasswords[user][i][-1] != '\n' else '', lut[value])
348346

349347
def attackDumpedTable():
350348
if kb.data.dumpedTable:

0 commit comments

Comments
 (0)