File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1616import lib .utils .search
1717import lib .utils .sqlalchemy
1818import thirdparty .ansistrm .ansistrm
19+ import thirdparty .chardet .universaldetector
1920
2021from lib .request .templates import getPageTemplate
2122
@@ -54,6 +55,9 @@ def _(self, *args):
5455 _http_client .LineAndFileWrapper ._readline = _http_client .LineAndFileWrapper .readline
5556 _http_client .LineAndFileWrapper .readline = _
5657
58+ # to prevent too much "guessing" in case of binary data retrieval
59+ thirdparty .chardet .universaldetector .MINIMUM_THRESHOLD = 0.90
60+
5761def resolveCrossReferences ():
5862 """
5963 Place for cross-reference resolution
Original file line number Diff line number Diff line change 1818from thirdparty .six import unichr as _unichr
1919
2020# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21- VERSION = "1.3.5.160 "
21+ VERSION = "1.3.5.161 "
2222TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2323TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2424VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
Original file line number Diff line number Diff line change @@ -637,6 +637,7 @@ def attackDumpedTable():
637637 col_passwords = set ()
638638 attack_dict = {}
639639 binary_fields = OrderedSet ()
640+ replacements = {}
640641
641642 for column in sorted (columns , key = len , reverse = True ):
642643 if column and column .lower () in COMMON_USER_COLUMNS :
@@ -668,7 +669,9 @@ def attackDumpedTable():
668669 value = table [column ]["values" ][i ]
669670
670671 if column in binary_fields and re .search (HASH_BINARY_COLUMNS_REGEX , column ) is not None :
672+ previous = value
671673 value = encodeHex (getBytes (value ), binary = False )
674+ replacements [value ] = previous
672675
673676 if hashRecognition (value ):
674677 found = True
@@ -703,7 +706,8 @@ def attackDumpedTable():
703706
704707 for (_ , hash_ , password ) in results :
705708 if hash_ :
706- lut [hash_ .lower ()] = password
709+ key = hash_ if hash_ not in replacements else replacements [hash_ ]
710+ lut [key .lower ()] = password
707711
708712 debugMsg = "post-processing table dump"
709713 logger .debug (debugMsg )
You can’t perform that action at this time.
0 commit comments