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

Skip to content

Commit 3f15c52

Browse files
committed
minor change in workflow for "tainted" parameter values
1 parent 2604e73 commit 3f15c52

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

lib/core/common.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
from lib.core.exception import sqlmapGenericException
7474
from lib.core.exception import sqlmapNoneDataException
7575
from lib.core.exception import sqlmapMissingDependence
76+
from lib.core.exception import sqlmapSilentQuitException
7677
from lib.core.exception import sqlmapSyntaxException
7778
from lib.core.optiondict import optDict
7879
from lib.core.settings import BIGARRAY_CHUNK_LENGTH
@@ -702,13 +703,19 @@ def paramToDict(place, parameters=None):
702703
testableParameters[parameter] = "=".join(elem[1:])
703704
if testableParameters[parameter].strip(DUMMY_SQL_INJECTION_CHARS) != testableParameters[parameter]\
704705
or re.search(r'\A9{3,}', testableParameters[parameter]) or re.search(DUMMY_USER_INJECTION, testableParameters[parameter]):
705-
errMsg = "you have provided tainted parameter values "
706-
errMsg += "('%s') with most probably leftover " % element
707-
errMsg += "chars from manual sql injection "
708-
errMsg += "tests (%s) or non-valid numerical value. " % DUMMY_SQL_INJECTION_CHARS
709-
errMsg += "Please, always use only valid parameter values "
710-
errMsg += "so sqlmap could be able to properly run"
711-
raise sqlmapSyntaxException, errMsg
706+
warnMsg = "it appears that you have provided tainted parameter values "
707+
warnMsg += "('%s') with most probably leftover " % element
708+
warnMsg += "chars from manual sql injection "
709+
warnMsg += "tests (%s) or non-valid numerical value. " % DUMMY_SQL_INJECTION_CHARS
710+
warnMsg += "Please, always use only valid parameter values "
711+
warnMsg += "so sqlmap could be able to properly run "
712+
logger.warn(warnMsg)
713+
714+
message = "Are you sure you want to continue? [y/N] "
715+
test = readInput(message, default="N")
716+
if test[0] not in ("y", "Y"):
717+
raise sqlmapSilentQuitException
718+
712719
else:
713720
root = ET.XML(parameters)
714721
iterator = root.getiterator()

0 commit comments

Comments
 (0)