Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1db6953

Browse files
committed
Proper fix for #2236
1 parent d431c7d commit 1db6953

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

lib/core/option.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2242,9 +2242,10 @@ def _mergeOptions(inputOptions, overrideOptions):
22422242
if key not in conf or value not in (None, False) or overrideOptions:
22432243
conf[key] = value
22442244

2245-
for key, value in conf.items():
2246-
if value is not None:
2247-
kb.explicitSettings.add(key)
2245+
if not hasattr(conf, "api"):
2246+
for key, value in conf.items():
2247+
if value is not None:
2248+
kb.explicitSettings.add(key)
22482249

22492250
for key, value in defaults.items():
22502251
if hasattr(conf, key) and conf[key] is None:

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.10.46"
22+
VERSION = "1.0.10.47"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/utils/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from lib.core.data import paths
3030
from lib.core.data import logger
3131
from lib.core.datatype import AttribDict
32+
from lib.core.defaults import _defaults
3233
from lib.core.enums import CONTENT_STATUS
3334
from lib.core.enums import MKSTEMP_PREFIX
3435
from lib.core.enums import PART_RUN_CONTENT_TYPES
@@ -132,7 +133,7 @@ def initialize_options(self, taskid):
132133
for _ in optDict:
133134
for name, type_ in optDict[_].items():
134135
type_ = unArrayizeValue(type_)
135-
self.options[name] = datatype[type_] # don't use _defaults here (breaking kb.explicitSettings logic)
136+
self.options[name] = _defaults.get(name, datatype[type_])
136137

137138
# Let sqlmap engine knows it is getting called by the API,
138139
# the task ID and the file path of the IPC database

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ e4aec2b11c1ad6039d0c3dbbfbc5eb1a lib/core/exception.py
3939
cc9c82cfffd8ee9b25ba3af6284f057e lib/core/__init__.py
4040
91c514013daa796e2cdd940389354eac lib/core/log.py
4141
468ca9a68a5a40a1cb8395602083ba32 lib/core/optiondict.py
42-
6d3e00fe69fd2fe9a794cae18b48b56c lib/core/option.py
42+
470577bfa701af901b29fbc837c5d537 lib/core/option.py
4343
7af487340c138f7b5dbd443161cbb428 lib/core/profiling.py
4444
e60456db5380840a586654344003d4e6 lib/core/readlineng.py
4545
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
4646
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
4747
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48-
94590a9ec85ca3c9f9bb04ee910db4e0 lib/core/settings.py
48+
47e5203e353435e6b15651e616877347 lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
c3ace7874a536d801f308cf1fd03df99 lib/core/target.py
@@ -99,7 +99,7 @@ cc9c82cfffd8ee9b25ba3af6284f057e lib/techniques/__init__.py
9999
cc9c82cfffd8ee9b25ba3af6284f057e lib/techniques/union/__init__.py
100100
f5d6884cdeed28281187c111d3e49e3b lib/techniques/union/test.py
101101
12ce1bb7ee5f1f23f58be12fe9fa8472 lib/techniques/union/use.py
102-
f48873f749b53a9e475292590ba7ed2e lib/utils/api.py
102+
26c1babc6289fac9056f8b21d10f3bb1 lib/utils/api.py
103103
8cdc8c1e663c3b92a756fb7b02cc3c02 lib/utils/crawler.py
104104
84604ae4cf0f31602b412036b51f5dae lib/utils/deps.py
105105
4dfd3a95e73e806f62372d63bc82511f lib/utils/getch.py

0 commit comments

Comments
 (0)