diff --git a/lib/core/optiondict.py b/lib/core/optiondict.py index b72cdffe4..1acf47627 100644 --- a/lib/core/optiondict.py +++ b/lib/core/optiondict.py @@ -211,6 +211,7 @@ optDict = { "hexConvert": "boolean", "outputDir": "string", "parseErrors": "boolean", + "repair": "boolean", "saveConfig": "string", "scope": "string", "testFilter": "string", diff --git a/lib/core/settings.py b/lib/core/settings.py index ab0a61af0..701866ff3 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.3.2.22" +VERSION = "1.3.2.23" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" 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) diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 927eaa2b0..388634e0e 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -31,6 +31,7 @@ from lib.core.exception import SqlmapShellQuitException from lib.core.exception import SqlmapSyntaxException from lib.core.settings import BASIC_HELP_ITEMS from lib.core.settings import DUMMY_URL +from lib.core.settings import INFERENCE_UNKNOWN_CHAR from lib.core.settings import IS_WIN from lib.core.settings import MAX_HELP_OPTION_LENGTH from lib.core.settings import VERSION_STRING @@ -594,6 +595,9 @@ def cmdLineParser(argv=None): general.add_option("--parse-errors", dest="parseErrors", action="store_true", help="Parse and display DBMS error messages from responses") + general.add_option("--repair", dest="repair", action="store_true", + help="Redump entries having unknown character marker (%s)" % INFERENCE_UNKNOWN_CHAR) + general.add_option("--save", dest="saveConfig", help="Save options to a configuration INI file") diff --git a/lib/techniques/blind/inference.py b/lib/techniques/blind/inference.py index 340d61344..46da3e6ab 100644 --- a/lib/techniques/blind/inference.py +++ b/lib/techniques/blind/inference.py @@ -82,7 +82,9 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None retVal = hashDBRetrieve(expression, checkConf=True) if retVal: - if PARTIAL_HEX_VALUE_MARKER in retVal: + if conf.repair and INFERENCE_UNKNOWN_CHAR in retVal: + pass + elif PARTIAL_HEX_VALUE_MARKER in retVal: retVal = retVal.replace(PARTIAL_HEX_VALUE_MARKER, "") if retVal and conf.hexConvert: diff --git a/sqlmap.conf b/sqlmap.conf index 88bcd002c..0a2331ace 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -725,6 +725,10 @@ outputDir = # Valid: True or False parseErrors = False +# Redump entries having unknown character marker (?). +# Valid: True or False +repair = False + # Regular expression for filtering targets from provided Burp. # or WebScarab proxy log. # Example: (google|yahoo) diff --git a/txt/checksum.md5 b/txt/checksum.md5 index 6f6da31b0..d58ddc1fc 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -42,7 +42,7 @@ abcb1121eb56d3401839d14e8ed06b6e lib/core/data.py 84ef8f32e4582fcc294dc14e1997131d lib/core/exception.py fb6be55d21a70765e35549af2484f762 lib/core/__init__.py 18c896b157b03af716542e5fe9233ef9 lib/core/log.py -fa9f24e88c81a6cef52da3dd5e637010 lib/core/optiondict.py +151136142a14bee82cb02a9ca64c741d lib/core/optiondict.py fca2d30cc9f9f5906e53542b2a9c247e lib/core/option.py fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py 4b12aa67fbf6c973d12e54cf9cb54ea0 lib/core/profiling.py @@ -50,7 +50,7 @@ d5ef43fe3cdd6c2602d7db45651f9ceb lib/core/readlineng.py 7d8a22c582ad201f65b73225e4456170 lib/core/replication.py 3179d34f371e0295dd4604568fb30bcd lib/core/revision.py d6269c55789f78cf707e09a0f5b45443 lib/core/session.py -8b2b5526b9a22e010342ff8f37e1cb15 lib/core/settings.py +3e31c14f05909fc1d676aee8d8a99c57 lib/core/settings.py 4483b4a5b601d8f1c4281071dff21ecc lib/core/shell.py 10fd19b0716ed261e6d04f311f6f527c lib/core/subprocessng.py 43772ea73e9e3d446f782af591cb4eda lib/core/target.py @@ -61,7 +61,7 @@ d6269c55789f78cf707e09a0f5b45443 lib/core/session.py 5b3f08208be0579356f78ce5805d37b2 lib/core/wordlist.py fb6be55d21a70765e35549af2484f762 lib/__init__.py 4881480d0c1778053908904e04570dc3 lib/parse/banner.py -87a1d50411e74cd0afb2d1bed30f59d4 lib/parse/cmdline.py +b23a0940d21347975a783c63fe671974 lib/parse/cmdline.py 06ccbccb63255c8f1c35950a4c8a6f6b lib/parse/configfile.py d34df646508c2dceb25205e1316673d1 lib/parse/handler.py 43deb2400e269e602e916efaec7c0903 lib/parse/headers.py @@ -91,7 +91,7 @@ fb6be55d21a70765e35549af2484f762 lib/takeover/__init__.py ad038ac567f97a4b940b7987792d64a4 lib/takeover/udf.py f0a809475eb0db95ffbe89fd6ca5bd96 lib/takeover/web.py 1aadcdc058bb813d09ad23d26ea2a6b5 lib/takeover/xp_cmdshell.py -654d222cbae610923965c583355ec34a lib/techniques/blind/inference.py +5d402892bf1e9b2c62ab2cfde21a6e11 lib/techniques/blind/inference.py fb6be55d21a70765e35549af2484f762 lib/techniques/blind/__init__.py fb6be55d21a70765e35549af2484f762 lib/techniques/dns/__init__.py ea48db4c48276d7d0e71aa467c0c523f lib/techniques/dns/test.py