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

Skip to content

Commit ec6fa38

Browse files
committed
update
1 parent 0c9fa5c commit ec6fa38

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

lib/core/common.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
from lib.core.settings import UNICODE_ENCODING
6868
from lib.core.settings import DBMS_DICT
6969
from lib.core.settings import DESCRIPTION
70+
from lib.core.settings import DUMMY_SQL_INJECTION_CHARS
7071
from lib.core.settings import IS_WIN
7172
from lib.core.settings import PLATFORM
7273
from lib.core.settings import PYVERSION
@@ -498,6 +499,13 @@ def paramToDict(place, parameters=None):
498499
condition |= parameter in conf.testParameter
499500

500501
if condition:
502+
if elem[1].strip(DUMMY_SQL_INJECTION_CHARS) != elem[1]:
503+
errMsg = "you have provided parameters with most "
504+
errMsg += "probably leftovers from manual sql injection "
505+
errMsg += "tests (%s). " % DUMMY_SQL_INJECTION_CHARS
506+
errMsg += "please, remove them so sqlmap could be able "
507+
errMsg += "to do a valid run."
508+
raise sqlmapSyntaxException, errMsg
501509
testableParameters[parameter] = elem[1]
502510
else:
503511
root = ET.XML(parameters)

lib/core/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,3 +351,6 @@
351351

352352
# Regular expression used for extracting HTML title
353353
HTML_TITLE_REGEX = "<title>(?P<result>[^<]+)</title>"
354+
355+
# Chars used to quickly distinguish if the user provided tainted parameter values
356+
DUMMY_SQL_INJECTION_CHARS = ";()'"

0 commit comments

Comments
 (0)