Proper fix for #2236

This commit is contained in:
Miroslav Stampar 2016-10-18 20:17:51 +02:00
parent d431c7d155
commit 1db6953f08
4 changed files with 10 additions and 8 deletions

View File

@ -2242,6 +2242,7 @@ def _mergeOptions(inputOptions, overrideOptions):
if key not in conf or value not in (None, False) or overrideOptions: if key not in conf or value not in (None, False) or overrideOptions:
conf[key] = value conf[key] = value
if not hasattr(conf, "api"):
for key, value in conf.items(): for key, value in conf.items():
if value is not None: if value is not None:
kb.explicitSettings.add(key) kb.explicitSettings.add(key)

View File

@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.0.10.46" VERSION = "1.0.10.47"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -29,6 +29,7 @@ from lib.core.data import kb
from lib.core.data import paths from lib.core.data import paths
from lib.core.data import logger from lib.core.data import logger
from lib.core.datatype import AttribDict from lib.core.datatype import AttribDict
from lib.core.defaults import _defaults
from lib.core.enums import CONTENT_STATUS from lib.core.enums import CONTENT_STATUS
from lib.core.enums import MKSTEMP_PREFIX from lib.core.enums import MKSTEMP_PREFIX
from lib.core.enums import PART_RUN_CONTENT_TYPES from lib.core.enums import PART_RUN_CONTENT_TYPES
@ -132,7 +133,7 @@ class Task(object):
for _ in optDict: for _ in optDict:
for name, type_ in optDict[_].items(): for name, type_ in optDict[_].items():
type_ = unArrayizeValue(type_) type_ = unArrayizeValue(type_)
self.options[name] = datatype[type_] # don't use _defaults here (breaking kb.explicitSettings logic) self.options[name] = _defaults.get(name, datatype[type_])
# Let sqlmap engine knows it is getting called by the API, # Let sqlmap engine knows it is getting called by the API,
# the task ID and the file path of the IPC database # the task ID and the file path of the IPC database

View File

@ -39,13 +39,13 @@ e4aec2b11c1ad6039d0c3dbbfbc5eb1a lib/core/exception.py
cc9c82cfffd8ee9b25ba3af6284f057e lib/core/__init__.py cc9c82cfffd8ee9b25ba3af6284f057e lib/core/__init__.py
91c514013daa796e2cdd940389354eac lib/core/log.py 91c514013daa796e2cdd940389354eac lib/core/log.py
468ca9a68a5a40a1cb8395602083ba32 lib/core/optiondict.py 468ca9a68a5a40a1cb8395602083ba32 lib/core/optiondict.py
6d3e00fe69fd2fe9a794cae18b48b56c lib/core/option.py 470577bfa701af901b29fbc837c5d537 lib/core/option.py
7af487340c138f7b5dbd443161cbb428 lib/core/profiling.py 7af487340c138f7b5dbd443161cbb428 lib/core/profiling.py
e60456db5380840a586654344003d4e6 lib/core/readlineng.py e60456db5380840a586654344003d4e6 lib/core/readlineng.py
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py 5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
99a2b496b9d5b546b335653ca801153f lib/core/revision.py 99a2b496b9d5b546b335653ca801153f lib/core/revision.py
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py 7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
94590a9ec85ca3c9f9bb04ee910db4e0 lib/core/settings.py 47e5203e353435e6b15651e616877347 lib/core/settings.py
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py 7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py 23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
c3ace7874a536d801f308cf1fd03df99 lib/core/target.py c3ace7874a536d801f308cf1fd03df99 lib/core/target.py
@ -99,7 +99,7 @@ cc9c82cfffd8ee9b25ba3af6284f057e lib/techniques/__init__.py
cc9c82cfffd8ee9b25ba3af6284f057e lib/techniques/union/__init__.py cc9c82cfffd8ee9b25ba3af6284f057e lib/techniques/union/__init__.py
f5d6884cdeed28281187c111d3e49e3b lib/techniques/union/test.py f5d6884cdeed28281187c111d3e49e3b lib/techniques/union/test.py
12ce1bb7ee5f1f23f58be12fe9fa8472 lib/techniques/union/use.py 12ce1bb7ee5f1f23f58be12fe9fa8472 lib/techniques/union/use.py
f48873f749b53a9e475292590ba7ed2e lib/utils/api.py 26c1babc6289fac9056f8b21d10f3bb1 lib/utils/api.py
8cdc8c1e663c3b92a756fb7b02cc3c02 lib/utils/crawler.py 8cdc8c1e663c3b92a756fb7b02cc3c02 lib/utils/crawler.py
84604ae4cf0f31602b412036b51f5dae lib/utils/deps.py 84604ae4cf0f31602b412036b51f5dae lib/utils/deps.py
4dfd3a95e73e806f62372d63bc82511f lib/utils/getch.py 4dfd3a95e73e806f62372d63bc82511f lib/utils/getch.py