mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-26 00:33:14 +03:00
fix for a Bug #200
This commit is contained in:
parent
77a53228c5
commit
798ab4989b
|
@ -954,6 +954,7 @@ def __setConfAttributes():
|
||||||
conf.httpHeaders = []
|
conf.httpHeaders = []
|
||||||
conf.hostname = None
|
conf.hostname = None
|
||||||
conf.loggedToOut = None
|
conf.loggedToOut = None
|
||||||
|
conf.matchRatio = None
|
||||||
conf.md5hash = None
|
conf.md5hash = None
|
||||||
conf.multipleTargets = False
|
conf.multipleTargets = False
|
||||||
conf.outputPath = None
|
conf.outputPath = None
|
||||||
|
|
|
@ -72,6 +72,7 @@ optDict = {
|
||||||
"regexp": "string",
|
"regexp": "string",
|
||||||
"eString": "string",
|
"eString": "string",
|
||||||
"eRegexp": "string",
|
"eRegexp": "string",
|
||||||
|
"thold": "float",
|
||||||
"useBetween": "boolean",
|
"useBetween": "boolean",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -191,8 +191,8 @@ def cmdLineParser():
|
||||||
help="Matches to be excluded before "
|
help="Matches to be excluded before "
|
||||||
"comparing page contents")
|
"comparing page contents")
|
||||||
|
|
||||||
injection.add_option("--ratio", dest="matchRatio", type="float",
|
injection.add_option("--threshold", dest="thold", type="float",
|
||||||
help="Page comparison treshold value")
|
help="Page comparison threshold value (0.0-1.0)")
|
||||||
|
|
||||||
injection.add_option("--use-between", dest="useBetween",
|
injection.add_option("--use-between", dest="useBetween",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
|
|
|
@ -88,7 +88,10 @@ def comparison(page, headers=None, getSeqMatcher=False):
|
||||||
# If the url is stable and we did not set yet the match ratio and the
|
# If the url is stable and we did not set yet the match ratio and the
|
||||||
# current injected value changes the url page content
|
# current injected value changes the url page content
|
||||||
if conf.matchRatio is None:
|
if conf.matchRatio is None:
|
||||||
if conf.md5hash is not None and ratio > 0.6 and ratio < 1:
|
if conf.thold:
|
||||||
|
conf.matchRatio = conf.thold
|
||||||
|
|
||||||
|
elif conf.md5hash is not None and ratio > 0.6 and ratio < 1:
|
||||||
logger.debug("setting match ratio to %.3f" % ratio)
|
logger.debug("setting match ratio to %.3f" % ratio)
|
||||||
conf.matchRatio = ratio
|
conf.matchRatio = ratio
|
||||||
|
|
||||||
|
@ -96,8 +99,8 @@ def comparison(page, headers=None, getSeqMatcher=False):
|
||||||
logger.debug("setting match ratio to default value 0.900")
|
logger.debug("setting match ratio to default value 0.900")
|
||||||
conf.matchRatio = 0.900
|
conf.matchRatio = 0.900
|
||||||
|
|
||||||
if conf.matchRatio is not None:
|
if conf.matchRatio is not None:
|
||||||
setMatchRatio()
|
setMatchRatio()
|
||||||
|
|
||||||
# If it has been requested to return the ratio and not a comparison
|
# If it has been requested to return the ratio and not a comparison
|
||||||
# response
|
# response
|
||||||
|
|
|
@ -187,6 +187,10 @@ eString =
|
||||||
# (http://www.python.org/doc/2.5.2/lib/re-syntax.html)
|
# (http://www.python.org/doc/2.5.2/lib/re-syntax.html)
|
||||||
eRegexp =
|
eRegexp =
|
||||||
|
|
||||||
|
# Page comparison threshold value (aka matchRatio)
|
||||||
|
# Valid: 0.0-1.0
|
||||||
|
thold =
|
||||||
|
|
||||||
# Use operator BETWEEN instead of default '>'
|
# Use operator BETWEEN instead of default '>'
|
||||||
# Valid: True or False
|
# Valid: True or False
|
||||||
useBetween = False
|
useBetween = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user