mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-13 18:10:38 +03:00
Implementing switch --repair (Issue #2888)
This commit is contained in:
parent
8fe37f3564
commit
af890d639d
|
@ -211,6 +211,7 @@ optDict = {
|
||||||
"hexConvert": "boolean",
|
"hexConvert": "boolean",
|
||||||
"outputDir": "string",
|
"outputDir": "string",
|
||||||
"parseErrors": "boolean",
|
"parseErrors": "boolean",
|
||||||
|
"repair": "boolean",
|
||||||
"saveConfig": "string",
|
"saveConfig": "string",
|
||||||
"scope": "string",
|
"scope": "string",
|
||||||
"testFilter": "string",
|
"testFilter": "string",
|
||||||
|
|
|
@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||||
from lib.core.enums import OS
|
from lib.core.enums import OS
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.2.22"
|
VERSION = "1.3.2.23"
|
||||||
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)
|
||||||
|
|
|
@ -31,6 +31,7 @@ from lib.core.exception import SqlmapShellQuitException
|
||||||
from lib.core.exception import SqlmapSyntaxException
|
from lib.core.exception import SqlmapSyntaxException
|
||||||
from lib.core.settings import BASIC_HELP_ITEMS
|
from lib.core.settings import BASIC_HELP_ITEMS
|
||||||
from lib.core.settings import DUMMY_URL
|
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 IS_WIN
|
||||||
from lib.core.settings import MAX_HELP_OPTION_LENGTH
|
from lib.core.settings import MAX_HELP_OPTION_LENGTH
|
||||||
from lib.core.settings import VERSION_STRING
|
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",
|
general.add_option("--parse-errors", dest="parseErrors", action="store_true",
|
||||||
help="Parse and display DBMS error messages from responses")
|
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",
|
general.add_option("--save", dest="saveConfig",
|
||||||
help="Save options to a configuration INI file")
|
help="Save options to a configuration INI file")
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,9 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||||
retVal = hashDBRetrieve(expression, checkConf=True)
|
retVal = hashDBRetrieve(expression, checkConf=True)
|
||||||
|
|
||||||
if retVal:
|
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, "")
|
retVal = retVal.replace(PARTIAL_HEX_VALUE_MARKER, "")
|
||||||
|
|
||||||
if retVal and conf.hexConvert:
|
if retVal and conf.hexConvert:
|
||||||
|
|
|
@ -725,6 +725,10 @@ outputDir =
|
||||||
# Valid: True or False
|
# Valid: True or False
|
||||||
parseErrors = False
|
parseErrors = False
|
||||||
|
|
||||||
|
# Redump entries having unknown character marker (?).
|
||||||
|
# Valid: True or False
|
||||||
|
repair = False
|
||||||
|
|
||||||
# Regular expression for filtering targets from provided Burp.
|
# Regular expression for filtering targets from provided Burp.
|
||||||
# or WebScarab proxy log.
|
# or WebScarab proxy log.
|
||||||
# Example: (google|yahoo)
|
# Example: (google|yahoo)
|
||||||
|
|
|
@ -42,7 +42,7 @@ abcb1121eb56d3401839d14e8ed06b6e lib/core/data.py
|
||||||
84ef8f32e4582fcc294dc14e1997131d lib/core/exception.py
|
84ef8f32e4582fcc294dc14e1997131d lib/core/exception.py
|
||||||
fb6be55d21a70765e35549af2484f762 lib/core/__init__.py
|
fb6be55d21a70765e35549af2484f762 lib/core/__init__.py
|
||||||
18c896b157b03af716542e5fe9233ef9 lib/core/log.py
|
18c896b157b03af716542e5fe9233ef9 lib/core/log.py
|
||||||
fa9f24e88c81a6cef52da3dd5e637010 lib/core/optiondict.py
|
151136142a14bee82cb02a9ca64c741d lib/core/optiondict.py
|
||||||
fca2d30cc9f9f5906e53542b2a9c247e lib/core/option.py
|
fca2d30cc9f9f5906e53542b2a9c247e lib/core/option.py
|
||||||
fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
|
fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
|
||||||
4b12aa67fbf6c973d12e54cf9cb54ea0 lib/core/profiling.py
|
4b12aa67fbf6c973d12e54cf9cb54ea0 lib/core/profiling.py
|
||||||
|
@ -50,7 +50,7 @@ d5ef43fe3cdd6c2602d7db45651f9ceb lib/core/readlineng.py
|
||||||
7d8a22c582ad201f65b73225e4456170 lib/core/replication.py
|
7d8a22c582ad201f65b73225e4456170 lib/core/replication.py
|
||||||
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
|
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
|
||||||
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
|
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
|
||||||
8b2b5526b9a22e010342ff8f37e1cb15 lib/core/settings.py
|
3e31c14f05909fc1d676aee8d8a99c57 lib/core/settings.py
|
||||||
4483b4a5b601d8f1c4281071dff21ecc lib/core/shell.py
|
4483b4a5b601d8f1c4281071dff21ecc lib/core/shell.py
|
||||||
10fd19b0716ed261e6d04f311f6f527c lib/core/subprocessng.py
|
10fd19b0716ed261e6d04f311f6f527c lib/core/subprocessng.py
|
||||||
43772ea73e9e3d446f782af591cb4eda lib/core/target.py
|
43772ea73e9e3d446f782af591cb4eda lib/core/target.py
|
||||||
|
@ -61,7 +61,7 @@ d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
|
||||||
5b3f08208be0579356f78ce5805d37b2 lib/core/wordlist.py
|
5b3f08208be0579356f78ce5805d37b2 lib/core/wordlist.py
|
||||||
fb6be55d21a70765e35549af2484f762 lib/__init__.py
|
fb6be55d21a70765e35549af2484f762 lib/__init__.py
|
||||||
4881480d0c1778053908904e04570dc3 lib/parse/banner.py
|
4881480d0c1778053908904e04570dc3 lib/parse/banner.py
|
||||||
87a1d50411e74cd0afb2d1bed30f59d4 lib/parse/cmdline.py
|
b23a0940d21347975a783c63fe671974 lib/parse/cmdline.py
|
||||||
06ccbccb63255c8f1c35950a4c8a6f6b lib/parse/configfile.py
|
06ccbccb63255c8f1c35950a4c8a6f6b lib/parse/configfile.py
|
||||||
d34df646508c2dceb25205e1316673d1 lib/parse/handler.py
|
d34df646508c2dceb25205e1316673d1 lib/parse/handler.py
|
||||||
43deb2400e269e602e916efaec7c0903 lib/parse/headers.py
|
43deb2400e269e602e916efaec7c0903 lib/parse/headers.py
|
||||||
|
@ -91,7 +91,7 @@ fb6be55d21a70765e35549af2484f762 lib/takeover/__init__.py
|
||||||
ad038ac567f97a4b940b7987792d64a4 lib/takeover/udf.py
|
ad038ac567f97a4b940b7987792d64a4 lib/takeover/udf.py
|
||||||
f0a809475eb0db95ffbe89fd6ca5bd96 lib/takeover/web.py
|
f0a809475eb0db95ffbe89fd6ca5bd96 lib/takeover/web.py
|
||||||
1aadcdc058bb813d09ad23d26ea2a6b5 lib/takeover/xp_cmdshell.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/blind/__init__.py
|
||||||
fb6be55d21a70765e35549af2484f762 lib/techniques/dns/__init__.py
|
fb6be55d21a70765e35549af2484f762 lib/techniques/dns/__init__.py
|
||||||
ea48db4c48276d7d0e71aa467c0c523f lib/techniques/dns/test.py
|
ea48db4c48276d7d0e71aa467c0c523f lib/techniques/dns/test.py
|
||||||
|
|
Loading…
Reference in New Issue
Block a user