minor update

This commit is contained in:
Miroslav Stampar 2011-10-23 21:12:34 +00:00
parent 1f7d87c6a4
commit 4a469c3258

View File

@ -665,12 +665,13 @@ def paramToDict(place, parameters=None):
if condition: if condition:
testableParameters[parameter] = "=".join(elem[1:]) testableParameters[parameter] = "=".join(elem[1:])
if testableParameters[parameter].strip(DUMMY_SQL_INJECTION_CHARS) != testableParameters[parameter]: if testableParameters[parameter].strip(DUMMY_SQL_INJECTION_CHARS) != testableParameters[parameter]\
or re.search(r'\A-[1-9]', testableParameters[parameter]):
errMsg = "you have provided tainted parameter values " errMsg = "you have provided tainted parameter values "
errMsg += "(%s) with most probably leftover " % element errMsg += "(%s) with most probably leftover " % element
errMsg += "chars from manual sql injection " errMsg += "chars from manual sql injection "
errMsg += "tests (%s). " % DUMMY_SQL_INJECTION_CHARS errMsg += "tests (%s) or negative numerical value. " % DUMMY_SQL_INJECTION_CHARS
errMsg += "please, always use only valid parameter values " errMsg += "Please, always use only valid parameter values "
errMsg += "so sqlmap could be able to do a valid run." errMsg += "so sqlmap could be able to do a valid run."
raise sqlmapSyntaxException, errMsg raise sqlmapSyntaxException, errMsg
else: else: