mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
minor update
This commit is contained in:
parent
0d24a15182
commit
e3b3e05748
|
@ -176,9 +176,15 @@ def sha1_generic_passwd(password, uppercase=False):
|
||||||
return retVal.upper() if uppercase else retVal.lower()
|
return retVal.upper() if uppercase else retVal.lower()
|
||||||
|
|
||||||
__functions__ = {
|
__functions__ = {
|
||||||
HASH.MYSQL: mysql_passwd, HASH.MYSQL_OLD: mysql_old_passwd, HASH.POSTGRES: postgres_passwd,
|
HASH.MYSQL: mysql_passwd,
|
||||||
HASH.MSSQL: mssql_passwd, HASH.MSSQL_OLD: mssql_old_passwd, HASH.ORACLE: oracle_passwd,
|
HASH.MYSQL_OLD: mysql_old_passwd,
|
||||||
HASH.ORACLE_OLD: oracle_old_passwd, HASH.MD5_GENERIC: md5_generic_passwd, HASH.SHA1_GENERIC: sha1_generic_passwd
|
HASH.POSTGRES: postgres_passwd,
|
||||||
|
HASH.MSSQL: mssql_passwd,
|
||||||
|
HASH.MSSQL_OLD: mssql_old_passwd,
|
||||||
|
HASH.ORACLE: oracle_passwd,
|
||||||
|
HASH.ORACLE_OLD: oracle_old_passwd,
|
||||||
|
HASH.MD5_GENERIC: md5_generic_passwd,
|
||||||
|
HASH.SHA1_GENERIC: sha1_generic_passwd
|
||||||
}
|
}
|
||||||
|
|
||||||
def dictionaryAttack():
|
def dictionaryAttack():
|
||||||
|
@ -194,10 +200,13 @@ def dictionaryAttack():
|
||||||
hash_ = hash_.split()[0]
|
hash_ = hash_.split()[0]
|
||||||
|
|
||||||
for name, regex in getPublicTypeMembers(HASH):
|
for name, regex in getPublicTypeMembers(HASH):
|
||||||
|
#hashes for Oracle and old MySQL look the same hence these checks
|
||||||
if kb.dbms == DBMS.ORACLE and regex == HASH.MYSQL_OLD:
|
if kb.dbms == DBMS.ORACLE and regex == HASH.MYSQL_OLD:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
elif kb.dbms == DBMS.MYSQL and regex == HASH.ORACLE_OLD:
|
elif kb.dbms == DBMS.MYSQL and regex == HASH.ORACLE_OLD:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
elif re.match(regex, hash_):
|
elif re.match(regex, hash_):
|
||||||
rehash = regex
|
rehash = regex
|
||||||
infoMsg = "using hash method: '%s'" % name
|
infoMsg = "using hash method: '%s'" % name
|
||||||
|
|
Loading…
Reference in New Issue
Block a user