mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-09 08:00:36 +03:00
code refactoring some more
This commit is contained in:
parent
40fadf2f35
commit
81c16926c1
|
@ -452,7 +452,7 @@ def heuristicCheckSqlInjection(place, parameter, value):
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
else:
|
else:
|
||||||
infoMsg += "not be injectable"
|
infoMsg += "not be injectable"
|
||||||
logger.warning(infoMsg)
|
logger.warn(infoMsg)
|
||||||
|
|
||||||
def checkDynParam(place, parameter, value):
|
def checkDynParam(place, parameter, value):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -67,6 +67,7 @@ from lib.core.settings import DUMP_DEL_MARKER
|
||||||
from lib.core.settings import DUMP_TAB_MARKER
|
from lib.core.settings import DUMP_TAB_MARKER
|
||||||
from lib.core.settings import DUMP_START_MARKER
|
from lib.core.settings import DUMP_START_MARKER
|
||||||
from lib.core.settings import DUMP_STOP_MARKER
|
from lib.core.settings import DUMP_STOP_MARKER
|
||||||
|
from lib.core.settings import MIN_TIME_RESPONSES
|
||||||
|
|
||||||
class UnicodeRawConfigParser(RawConfigParser):
|
class UnicodeRawConfigParser(RawConfigParser):
|
||||||
"""
|
"""
|
||||||
|
@ -1542,7 +1543,15 @@ def wasLastRequestDelayed():
|
||||||
# 99.9999999997440% of all non time-based sql injection
|
# 99.9999999997440% of all non time-based sql injection
|
||||||
# affected response times should be inside +-7*stdev([normal response times])
|
# affected 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)
|
||||||
return (kb.lastQueryDuration >= average(kb.responseTimes) + 7 * stdev(kb.responseTimes))
|
deviation = stdev(kb.responseTimes)
|
||||||
|
if deviation:
|
||||||
|
if len(kb.responseTimes) < MIN_TIME_RESPONSES:
|
||||||
|
warnMsg = "time based standard deviation method used "
|
||||||
|
warnMsg += "on a model with less than %d response times" % MIN_TIME_RESPONSES
|
||||||
|
logger.warn(warnMsg)
|
||||||
|
return (kb.lastQueryDuration >= average(kb.responseTimes) + 7 * deviation)
|
||||||
|
else:
|
||||||
|
return kb.lastQueryDuration - conf.timeSec
|
||||||
|
|
||||||
def extractErrorMessage(page):
|
def extractErrorMessage(page):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -49,7 +49,7 @@ class Connector(GenericConnector):
|
||||||
|
|
||||||
except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError), msg:
|
except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError), msg:
|
||||||
warnMsg = "unable to connect using SQLite 3 library, trying with SQLite 2"
|
warnMsg = "unable to connect using SQLite 3 library, trying with SQLite 2"
|
||||||
logger.warning(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user