mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Minor improvement so that user's options can also be passed directly as a dictionary/advancedDict rather than only as an optparse instance.
This commit is contained in:
@@ -949,7 +949,12 @@ def __mergeOptions(inputOptions):
|
||||
if inputOptions.configFile:
|
||||
configFileParser(inputOptions.configFile)
|
||||
|
||||
for key, value in inputOptions.__dict__.items():
|
||||
if hasattr(inputOptions, "items"):
|
||||
inputOptionsItems = inputOptions.items()
|
||||
else:
|
||||
inputOptionsItems = inputOptions.__dict__.items()
|
||||
|
||||
for key, value in inputOptionsItems:
|
||||
if not conf.has_key(key) or conf[key] == None or value != None:
|
||||
conf[key] = value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user