mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03: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:
parent
5ac2b0658c
commit
3bca0d4b28
|
@ -949,7 +949,12 @@ def __mergeOptions(inputOptions):
|
||||||
if inputOptions.configFile:
|
if inputOptions.configFile:
|
||||||
configFileParser(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:
|
if not conf.has_key(key) or conf[key] == None or value != None:
|
||||||
conf[key] = value
|
conf[key] = value
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user