mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 03:23:48 +03:00
Adapted code following last commit
This commit is contained in:
parent
9de1671b8f
commit
7e925bcfe8
|
@ -42,12 +42,18 @@ def configFileProxy(section, option, boolean=False, integer=False):
|
||||||
global config
|
global config
|
||||||
|
|
||||||
if config.has_option(section, option):
|
if config.has_option(section, option):
|
||||||
if boolean:
|
value = config.get(section, option)
|
||||||
value = config.getboolean(section, option)
|
|
||||||
elif integer:
|
if not value:
|
||||||
value = config.getint(section, option)
|
value = None
|
||||||
else:
|
elif value.isdigit():
|
||||||
value = config.get(section, option)
|
value = int(value)
|
||||||
|
elif value == "False":
|
||||||
|
value = False
|
||||||
|
elif value == "True":
|
||||||
|
value = True
|
||||||
|
|
||||||
|
print option, value, type(value)
|
||||||
|
|
||||||
if value:
|
if value:
|
||||||
conf[option] = value
|
conf[option] = value
|
||||||
|
@ -91,6 +97,9 @@ def configFileParser(configFile):
|
||||||
boolean = False
|
boolean = False
|
||||||
integer = False
|
integer = False
|
||||||
|
|
||||||
|
if isinstance(data, (tuple, dict, set)):
|
||||||
|
data = data[0]
|
||||||
|
|
||||||
if data == "boolean":
|
if data == "boolean":
|
||||||
boolean = True
|
boolean = True
|
||||||
elif data == "integer":
|
elif data == "integer":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user