mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 11:03:47 +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:
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user