mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 11:45:46 +03:00
Implements #3895
This commit is contained in:
parent
0aa15a72b0
commit
83aa1ac6a7
|
@ -130,12 +130,12 @@ class HASH(object):
|
||||||
MSSQL_NEW = r'(?i)\A0x0200[0-9a-f]{8}[0-9a-f]{128}\Z'
|
MSSQL_NEW = r'(?i)\A0x0200[0-9a-f]{8}[0-9a-f]{128}\Z'
|
||||||
ORACLE = r'(?i)\As:[0-9a-f]{60}\Z'
|
ORACLE = r'(?i)\As:[0-9a-f]{60}\Z'
|
||||||
ORACLE_OLD = r'(?i)\A[0-9a-f]{16}\Z'
|
ORACLE_OLD = r'(?i)\A[0-9a-f]{16}\Z'
|
||||||
MD5_GENERIC = r'(?i)\A[0-9a-f]{32}\Z'
|
MD5_GENERIC = r'(?i)\A(0x)?[0-9a-f]{32}\Z'
|
||||||
SHA1_GENERIC = r'(?i)\A[0-9a-f]{40}\Z'
|
SHA1_GENERIC = r'(?i)\A(0x)?[0-9a-f]{40}\Z'
|
||||||
SHA224_GENERIC = r'(?i)\A[0-9a-f]{56}\Z'
|
SHA224_GENERIC = r'(?i)\A[0-9a-f]{56}\Z'
|
||||||
SHA256_GENERIC = r'(?i)\A[0-9a-f]{64}\Z'
|
SHA256_GENERIC = r'(?i)\A(0x)?[0-9a-f]{64}\Z'
|
||||||
SHA384_GENERIC = r'(?i)\A[0-9a-f]{96}\Z'
|
SHA384_GENERIC = r'(?i)\A[0-9a-f]{96}\Z'
|
||||||
SHA512_GENERIC = r'(?i)\A[0-9a-f]{128}\Z'
|
SHA512_GENERIC = r'(?i)\A(0x)?[0-9a-f]{128}\Z'
|
||||||
CRYPT_GENERIC = r'\A(?!\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\Z)(?![0-9]+\Z)[./0-9A-Za-z]{13}\Z'
|
CRYPT_GENERIC = r'\A(?!\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\Z)(?![0-9]+\Z)[./0-9A-Za-z]{13}\Z'
|
||||||
JOOMLA = r'\A[0-9a-f]{32}:\w{32}\Z'
|
JOOMLA = r'\A[0-9a-f]{32}:\w{32}\Z'
|
||||||
WORDPRESS = r'\A\$P\$[./0-9a-zA-Z]{31}\Z'
|
WORDPRESS = r'\A\$P\$[./0-9a-zA-Z]{31}\Z'
|
||||||
|
|
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.8.25"
|
VERSION = "1.3.8.26"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
|
@ -709,6 +709,7 @@ def attackDumpedTable():
|
||||||
if hash_:
|
if hash_:
|
||||||
key = hash_ if hash_ not in replacements else replacements[hash_]
|
key = hash_ if hash_ not in replacements else replacements[hash_]
|
||||||
lut[key.lower()] = password
|
lut[key.lower()] = password
|
||||||
|
lut["0x%s" % key.lower()] = password
|
||||||
|
|
||||||
debugMsg = "post-processing table dump"
|
debugMsg = "post-processing table dump"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
|
@ -943,6 +944,8 @@ def dictionaryAttack(attack_dict):
|
||||||
if hash_regex in (HASH.MD5_BASE64, HASH.SHA1_BASE64, HASH.SHA256_BASE64, HASH.SHA512_BASE64):
|
if hash_regex in (HASH.MD5_BASE64, HASH.SHA1_BASE64, HASH.SHA256_BASE64, HASH.SHA512_BASE64):
|
||||||
item = [(user, encodeHex(decodeBase64(hash_, binary=True))), {}]
|
item = [(user, encodeHex(decodeBase64(hash_, binary=True))), {}]
|
||||||
elif hash_regex in (HASH.MYSQL, HASH.MYSQL_OLD, HASH.MD5_GENERIC, HASH.SHA1_GENERIC, HASH.SHA224_GENERIC, HASH.SHA256_GENERIC, HASH.SHA384_GENERIC, HASH.SHA512_GENERIC, HASH.APACHE_SHA1):
|
elif hash_regex in (HASH.MYSQL, HASH.MYSQL_OLD, HASH.MD5_GENERIC, HASH.SHA1_GENERIC, HASH.SHA224_GENERIC, HASH.SHA256_GENERIC, HASH.SHA384_GENERIC, HASH.SHA512_GENERIC, HASH.APACHE_SHA1):
|
||||||
|
if hash_.startswith("0x"): # Reference: https://docs.microsoft.com/en-us/sql/t-sql/functions/hashbytes-transact-sql?view=sql-server-2017
|
||||||
|
hash_ = hash_[2:]
|
||||||
item = [(user, hash_), {}]
|
item = [(user, hash_), {}]
|
||||||
elif hash_regex in (HASH.SSHA,):
|
elif hash_regex in (HASH.SSHA,):
|
||||||
item = [(user, hash_), {"salt": decodeBase64(hash_, binary=True)[20:]}]
|
item = [(user, hash_), {"salt": decodeBase64(hash_, binary=True)[20:]}]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user