mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +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.hostname = None
|
||||
conf.loggedToOut = None
|
||||
conf.matchRatio = None
|
||||
conf.md5hash = None
|
||||
conf.multipleTargets = False
|
||||
conf.outputPath = None
|
||||
|
|
|
@ -72,6 +72,7 @@ optDict = {
|
|||
"regexp": "string",
|
||||
"eString": "string",
|
||||
"eRegexp": "string",
|
||||
"thold": "float",
|
||||
"useBetween": "boolean",
|
||||
},
|
||||
|
||||
|
|
|
@ -191,8 +191,8 @@ def cmdLineParser():
|
|||
help="Matches to be excluded before "
|
||||
"comparing page contents")
|
||||
|
||||
injection.add_option("--ratio", dest="matchRatio", type="float",
|
||||
help="Page comparison treshold value")
|
||||
injection.add_option("--threshold", dest="thold", type="float",
|
||||
help="Page comparison threshold value (0.0-1.0)")
|
||||
|
||||
injection.add_option("--use-between", dest="useBetween",
|
||||
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
|
||||
# current injected value changes the url page content
|
||||
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)
|
||||
conf.matchRatio = ratio
|
||||
|
||||
|
|
|
@ -187,6 +187,10 @@ eString =
|
|||
# (http://www.python.org/doc/2.5.2/lib/re-syntax.html)
|
||||
eRegexp =
|
||||
|
||||
# Page comparison threshold value (aka matchRatio)
|
||||
# Valid: 0.0-1.0
|
||||
thold =
|
||||
|
||||
# Use operator BETWEEN instead of default '>'
|
||||
# Valid: True or False
|
||||
useBetween = False
|
||||
|
|
Loading…
Reference in New Issue
Block a user