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

Skip to content

Commit 8639217

Browse files
committed
Minor patch related to the #3822
1 parent 823119a commit 8639217

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

lib/core/option.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ def _createHomeDirectories():
14481448
Creates directories inside sqlmap's home directory
14491449
"""
14501450

1451-
if conf.purge:
1451+
if conf.get("purge"):
14521452
return
14531453

14541454
for context in "output", "history":
@@ -1461,7 +1461,7 @@ def _createHomeDirectories():
14611461
open(_, "w+b").close()
14621462
os.remove(_)
14631463

1464-
if conf.outputDir and context == "output":
1464+
if conf.get("outputDir") and context == "output":
14651465
warnMsg = "using '%s' as the %s directory" % (directory, context)
14661466
logger.warn(warnMsg)
14671467
except (OSError, IOError) as ex:

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

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

lib/parse/cmdline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def get_groups(parser):
5959
from lib.core.enums import AUTOCOMPLETE_TYPE
6060
from lib.core.exception import SqlmapShellQuitException
6161
from lib.core.exception import SqlmapSyntaxException
62+
from lib.core.option import _createHomeDirectories
6263
from lib.core.settings import BASIC_HELP_ITEMS
6364
from lib.core.settings import DUMMY_URL
6465
from lib.core.settings import INFERENCE_UNKNOWN_CHAR
@@ -829,6 +830,8 @@ def _format_action_invocation(self, action):
829830
prompt = "--sqlmap-shell" in argv
830831

831832
if prompt:
833+
_createHomeDirectories()
834+
832835
parser.usage = ""
833836
cmdLineOptions.sqlmapShell = True
834837

0 commit comments

Comments
 (0)