mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +03:00
minor style update
This commit is contained in:
parent
452ef202ae
commit
302d782a0f
|
@ -72,7 +72,7 @@ def checkSqlInjection(place, parameter, value):
|
||||||
# Localized thread data needed for some methods
|
# Localized thread data needed for some methods
|
||||||
threadData = getCurrentThreadData()
|
threadData = getCurrentThreadData()
|
||||||
|
|
||||||
# Set the flag for sql injection test mode
|
# Set the flag for SQL injection test mode
|
||||||
kb.testMode = True
|
kb.testMode = True
|
||||||
|
|
||||||
for test in getSortedInjectionTests():
|
for test in getSortedInjectionTests():
|
||||||
|
@ -647,7 +647,7 @@ def heuristicCheckSqlInjection(place, parameter):
|
||||||
def simpletonCheckSqlInjection(place, parameter, value):
|
def simpletonCheckSqlInjection(place, parameter, value):
|
||||||
"""
|
"""
|
||||||
This is a function for the quickest and simplest
|
This is a function for the quickest and simplest
|
||||||
sql injection check (e.g. AND 1=1) - only works
|
SQL injection check (e.g. AND 1=1) - only works
|
||||||
with integer parameters
|
with integer parameters
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -465,7 +465,7 @@ def start():
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
infoMsg = "testing sql injection on %s " % place
|
infoMsg = "testing for SQL injection on %s " % place
|
||||||
infoMsg += "parameter '%s'" % parameter
|
infoMsg += "parameter '%s'" % parameter
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
|
|
|
@ -544,7 +544,7 @@ def paramToDict(place, parameters=None):
|
||||||
or re.search(r'\A9{3,}', testableParameters[parameter]) or re.search(DUMMY_USER_INJECTION, testableParameters[parameter]):
|
or re.search(r'\A9{3,}', testableParameters[parameter]) or re.search(DUMMY_USER_INJECTION, testableParameters[parameter]):
|
||||||
warnMsg = "it appears that you have provided tainted parameter values "
|
warnMsg = "it appears that you have provided tainted parameter values "
|
||||||
warnMsg += "('%s') with most probably leftover " % element
|
warnMsg += "('%s') with most probably leftover " % element
|
||||||
warnMsg += "chars from manual sql injection "
|
warnMsg += "chars from manual SQL injection "
|
||||||
warnMsg += "tests (%s) or non-valid numerical value. " % DUMMY_SQL_INJECTION_CHARS
|
warnMsg += "tests (%s) or non-valid numerical value. " % DUMMY_SQL_INJECTION_CHARS
|
||||||
warnMsg += "Please, always use only valid parameter values "
|
warnMsg += "Please, always use only valid parameter values "
|
||||||
warnMsg += "so sqlmap could be able to properly run "
|
warnMsg += "so sqlmap could be able to properly run "
|
||||||
|
@ -1966,7 +1966,7 @@ def wasLastRequestDelayed():
|
||||||
Returns True if the last web request resulted in a time-delay
|
Returns True if the last web request resulted in a time-delay
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# 99.9999999997440% of all non time-based sql injection affected
|
# 99.9999999997440% of all non time-based SQL injection affected
|
||||||
# response times should be inside +-7*stdev([normal response times])
|
# response times should be inside +-7*stdev([normal response times])
|
||||||
# Math reference: http://www.answers.com/topic/standard-deviation
|
# Math reference: http://www.answers.com/topic/standard-deviation
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ def __setOutputResume():
|
||||||
if not conf.sessionFile:
|
if not conf.sessionFile:
|
||||||
conf.sessionFile = "%s%ssession" % (conf.outputPath, os.sep)
|
conf.sessionFile = "%s%ssession" % (conf.outputPath, os.sep)
|
||||||
|
|
||||||
logger.info("using '%s' as session file" % conf.sessionFile)
|
logger.info("using '%s' as a session file" % conf.sessionFile)
|
||||||
|
|
||||||
if os.path.exists(conf.sessionFile):
|
if os.path.exists(conf.sessionFile):
|
||||||
if not conf.flushSession:
|
if not conf.flushSession:
|
||||||
|
|
|
@ -83,7 +83,7 @@ def __oneShotErrorUse(expression, field):
|
||||||
incrementCounter(PAYLOAD.TECHNIQUE.ERROR)
|
incrementCounter(PAYLOAD.TECHNIQUE.ERROR)
|
||||||
|
|
||||||
# Parse the returned page to get the exact error-based
|
# Parse the returned page to get the exact error-based
|
||||||
# sql injection output
|
# SQL injection output
|
||||||
output = reduce(lambda x, y: x if x is not None else y, [ \
|
output = reduce(lambda x, y: x if x is not None else y, [ \
|
||||||
extractRegexResult(check, page, re.DOTALL | re.IGNORECASE), \
|
extractRegexResult(check, page, re.DOTALL | re.IGNORECASE), \
|
||||||
extractRegexResult(check, listToStrValue(headers.headers \
|
extractRegexResult(check, listToStrValue(headers.headers \
|
||||||
|
|
|
@ -76,7 +76,7 @@ def __oneShotUnionUse(expression, unpack=True, limited=False):
|
||||||
incrementCounter(PAYLOAD.TECHNIQUE.UNION)
|
incrementCounter(PAYLOAD.TECHNIQUE.UNION)
|
||||||
|
|
||||||
# Parse the returned page to get the exact union-based
|
# Parse the returned page to get the exact union-based
|
||||||
# sql injection output
|
# SQL injection output
|
||||||
retVal = reduce(lambda x, y: x if x is not None else y, ( \
|
retVal = reduce(lambda x, y: x if x is not None else y, ( \
|
||||||
extractRegexResult(check, removeReflectiveValues(page, payload), re.DOTALL | re.IGNORECASE), \
|
extractRegexResult(check, removeReflectiveValues(page, payload), re.DOTALL | re.IGNORECASE), \
|
||||||
extractRegexResult(check, removeReflectiveValues(listToStrValue(headers.headers \
|
extractRegexResult(check, removeReflectiveValues(listToStrValue(headers.headers \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user