mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
added --ratio option for direct manipulation of conf.matchRatio parameter
This commit is contained in:
@@ -943,7 +943,6 @@ def __setConfAttributes():
|
||||
conf.httpHeaders = []
|
||||
conf.hostname = None
|
||||
conf.loggedToOut = None
|
||||
conf.matchRatio = None
|
||||
conf.md5hash = None
|
||||
conf.multipleTargets = False
|
||||
conf.outputPath = None
|
||||
@@ -1136,6 +1135,11 @@ def __basicOptionValidation():
|
||||
errMsg = "value for --cpu-throttle (cpuThrottle) option must be in range [0,100]"
|
||||
raise sqlmapSyntaxException, errMsg
|
||||
|
||||
if conf.matchRatio is not None and isinstance(conf.matchRatio, float) and (conf.matchRatio > 1 or\
|
||||
conf.cpuThrottle < 0):
|
||||
errMsg = "value for --ratio (matchRatio) option must be in range [0,1]"
|
||||
raise sqlmapSyntaxException, errMsg
|
||||
|
||||
def init(inputOptions=advancedDict()):
|
||||
"""
|
||||
Set attributes into both configuration and knowledge base singletons
|
||||
|
||||
Reference in New Issue
Block a user