Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit af890d6

Browse files
committed
Implementing switch --repair (Issue #2888)
1 parent 8fe37f3 commit af890d6

6 files changed

Lines changed: 17 additions & 6 deletions

File tree

lib/core/optiondict.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@
211211
"hexConvert": "boolean",
212212
"outputDir": "string",
213213
"parseErrors": "boolean",
214+
"repair": "boolean",
214215
"saveConfig": "string",
215216
"scope": "string",
216217
"testFilter": "string",

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.3.2.22"
22+
VERSION = "1.3.2.23"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/parse/cmdline.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from lib.core.exception import SqlmapSyntaxException
3232
from lib.core.settings import BASIC_HELP_ITEMS
3333
from lib.core.settings import DUMMY_URL
34+
from lib.core.settings import INFERENCE_UNKNOWN_CHAR
3435
from lib.core.settings import IS_WIN
3536
from lib.core.settings import MAX_HELP_OPTION_LENGTH
3637
from lib.core.settings import VERSION_STRING
@@ -594,6 +595,9 @@ def cmdLineParser(argv=None):
594595
general.add_option("--parse-errors", dest="parseErrors", action="store_true",
595596
help="Parse and display DBMS error messages from responses")
596597

598+
general.add_option("--repair", dest="repair", action="store_true",
599+
help="Redump entries having unknown character marker (%s)" % INFERENCE_UNKNOWN_CHAR)
600+
597601
general.add_option("--save", dest="saveConfig",
598602
help="Save options to a configuration INI file")
599603

lib/techniques/blind/inference.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
8282
retVal = hashDBRetrieve(expression, checkConf=True)
8383

8484
if retVal:
85-
if PARTIAL_HEX_VALUE_MARKER in retVal:
85+
if conf.repair and INFERENCE_UNKNOWN_CHAR in retVal:
86+
pass
87+
elif PARTIAL_HEX_VALUE_MARKER in retVal:
8688
retVal = retVal.replace(PARTIAL_HEX_VALUE_MARKER, "")
8789

8890
if retVal and conf.hexConvert:

sqlmap.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,10 @@ outputDir =
725725
# Valid: True or False
726726
parseErrors = False
727727

728+
# Redump entries having unknown character marker (?).
729+
# Valid: True or False
730+
repair = False
731+
728732
# Regular expression for filtering targets from provided Burp.
729733
# or WebScarab proxy log.
730734
# Example: (google|yahoo)

txt/checksum.md5

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ abcb1121eb56d3401839d14e8ed06b6e lib/core/data.py
4242
84ef8f32e4582fcc294dc14e1997131d lib/core/exception.py
4343
fb6be55d21a70765e35549af2484f762 lib/core/__init__.py
4444
18c896b157b03af716542e5fe9233ef9 lib/core/log.py
45-
fa9f24e88c81a6cef52da3dd5e637010 lib/core/optiondict.py
45+
151136142a14bee82cb02a9ca64c741d lib/core/optiondict.py
4646
fca2d30cc9f9f5906e53542b2a9c247e lib/core/option.py
4747
fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
4848
4b12aa67fbf6c973d12e54cf9cb54ea0 lib/core/profiling.py
4949
d5ef43fe3cdd6c2602d7db45651f9ceb lib/core/readlineng.py
5050
7d8a22c582ad201f65b73225e4456170 lib/core/replication.py
5151
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
5252
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
53-
8b2b5526b9a22e010342ff8f37e1cb15 lib/core/settings.py
53+
3e31c14f05909fc1d676aee8d8a99c57 lib/core/settings.py
5454
4483b4a5b601d8f1c4281071dff21ecc lib/core/shell.py
5555
10fd19b0716ed261e6d04f311f6f527c lib/core/subprocessng.py
5656
43772ea73e9e3d446f782af591cb4eda lib/core/target.py
@@ -61,7 +61,7 @@ d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
6161
5b3f08208be0579356f78ce5805d37b2 lib/core/wordlist.py
6262
fb6be55d21a70765e35549af2484f762 lib/__init__.py
6363
4881480d0c1778053908904e04570dc3 lib/parse/banner.py
64-
87a1d50411e74cd0afb2d1bed30f59d4 lib/parse/cmdline.py
64+
b23a0940d21347975a783c63fe671974 lib/parse/cmdline.py
6565
06ccbccb63255c8f1c35950a4c8a6f6b lib/parse/configfile.py
6666
d34df646508c2dceb25205e1316673d1 lib/parse/handler.py
6767
43deb2400e269e602e916efaec7c0903 lib/parse/headers.py
@@ -91,7 +91,7 @@ fb6be55d21a70765e35549af2484f762 lib/takeover/__init__.py
9191
ad038ac567f97a4b940b7987792d64a4 lib/takeover/udf.py
9292
f0a809475eb0db95ffbe89fd6ca5bd96 lib/takeover/web.py
9393
1aadcdc058bb813d09ad23d26ea2a6b5 lib/takeover/xp_cmdshell.py
94-
654d222cbae610923965c583355ec34a lib/techniques/blind/inference.py
94+
5d402892bf1e9b2c62ab2cfde21a6e11 lib/techniques/blind/inference.py
9595
fb6be55d21a70765e35549af2484f762 lib/techniques/blind/__init__.py
9696
fb6be55d21a70765e35549af2484f762 lib/techniques/dns/__init__.py
9797
ea48db4c48276d7d0e71aa467c0c523f lib/techniques/dns/test.py

0 commit comments

Comments
 (0)