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

Skip to content

Commit 07a8587

Browse files
committed
Implementation for Issue #92
1 parent bb8cd78 commit 07a8587

4 files changed

Lines changed: 13 additions & 2 deletions

File tree

lib/core/optiondict.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@
6363
"dbms": "string",
6464
"os": "string",
6565
"invalidBignum": "boolean",
66-
"invalidLogical": "boolean",
66+
"invalidLogical": "boolean",
67+
"noCast": "boolean",
68+
"noUnescape": "boolean",
6769
"prefix": "string",
6870
"suffix": "string",
6971
"skip": "string",

lib/core/unescaper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
"""
77

88
from lib.core.common import Backend
9+
from lib.core.data import conf
910
from lib.core.data import kb
1011
from lib.core.datatype import AttribDict
1112
from lib.core.settings import EXCLUDE_UNESCAPE
1213

1314
class Unescaper(AttribDict):
1415
def unescape(self, expression, quote=True, dbms=None):
15-
if not kb.unescape:
16+
if not kb.unescape or conf.noUnescape:
1617
return expression
1718

1819
if expression is None:

lib/parse/cmdline.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ def cmdLineParser():
209209
action="store_true",
210210
help="Turn off payload casting mechanism")
211211

212+
injection.add_option("--no-unescape", dest="noUnescape",
213+
action="store_true",
214+
help="Turn off string unescaping mechanism")
215+
212216
injection.add_option("--prefix", dest="prefix",
213217
help="Injection payload prefix string")
214218

sqlmap.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ invalidLogical = False
207207
# Valid: True or False
208208
noCast = False
209209

210+
# Turn off string unescaping mechanism
211+
# Valid: True or False
212+
noUnescape = False
213+
210214
# Injection payload prefix string.
211215
prefix =
212216

0 commit comments

Comments
 (0)