started to work on #373 to improve usability when user is not DBA

This commit is contained in:
Bernardo Damele 2013-02-11 18:07:58 +00:00
parent d6db83fe88
commit 8bfee3b802

View File

@ -295,23 +295,23 @@ class Users:
errMsg += "database users (most probably because the session " errMsg += "database users (most probably because the session "
errMsg += "user has no read privileges over the relevant " errMsg += "user has no read privileges over the relevant "
errMsg += "system database table)" errMsg += "system database table)"
raise SqlmapNoneDataException(errMsg) logger.error(errMsg)
else: else:
for user in kb.data.cachedUsersPasswords: for user in kb.data.cachedUsersPasswords:
kb.data.cachedUsersPasswords[user] = list(set(kb.data.cachedUsersPasswords[user])) kb.data.cachedUsersPasswords[user] = list(set(kb.data.cachedUsersPasswords[user]))
storeHashesToFile(kb.data.cachedUsersPasswords) storeHashesToFile(kb.data.cachedUsersPasswords)
message = "do you want to perform a dictionary-based attack " message = "do you want to perform a dictionary-based attack "
message += "against retrieved password hashes? [Y/n/q]" message += "against retrieved password hashes? [Y/n/q]"
test = readInput(message, default="Y") test = readInput(message, default="Y")
if test[0] in ("n", "N"): if test[0] in ("n", "N"):
pass pass
elif test[0] in ("q", "Q"): elif test[0] in ("q", "Q"):
raise SqlmapUserQuitException raise SqlmapUserQuitException
else: else:
attackCachedUsersPasswords() attackCachedUsersPasswords()
return kb.data.cachedUsersPasswords return kb.data.cachedUsersPasswords