hash_1_17.py 743 B

1234567891011121314
  1. def attackCachedUsersPasswords():
  2. if kb.data.cachedUsersPasswords:
  3. results = dictionaryAttack(kb.data.cachedUsersPasswords)
  4. lut = {}
  5. for (_, hash_, password) in results:
  6. lut[hash_.lower()] = password
  7. for user in kb.data.cachedUsersPasswords.keys():
  8. for i in xrange(len(kb.data.cachedUsersPasswords[user])):
  9. if (kb.data.cachedUsersPasswords[user][i] or "").strip():
  10. value = kb.data.cachedUsersPasswords[user][i].lower().split()[0]
  11. if value in lut:
  12. kb.data.cachedUsersPasswords[user][i] += "%s clear-text password: %s" % ('\n' if kb.data.cachedUsersPasswords[user][i][-1] != '\n' else '', lut[value])