mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 02:53:46 +03:00
Minor patch related to the #3822
This commit is contained in:
parent
823119a247
commit
86392179c3
|
@ -1448,7 +1448,7 @@ def _createHomeDirectories():
|
||||||
Creates directories inside sqlmap's home directory
|
Creates directories inside sqlmap's home directory
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if conf.purge:
|
if conf.get("purge"):
|
||||||
return
|
return
|
||||||
|
|
||||||
for context in "output", "history":
|
for context in "output", "history":
|
||||||
|
@ -1461,7 +1461,7 @@ def _createHomeDirectories():
|
||||||
open(_, "w+b").close()
|
open(_, "w+b").close()
|
||||||
os.remove(_)
|
os.remove(_)
|
||||||
|
|
||||||
if conf.outputDir and context == "output":
|
if conf.get("outputDir") and context == "output":
|
||||||
warnMsg = "using '%s' as the %s directory" % (directory, context)
|
warnMsg = "using '%s' as the %s directory" % (directory, context)
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
except (OSError, IOError) as ex:
|
except (OSError, IOError) as ex:
|
||||||
|
|
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.7.25"
|
VERSION = "1.3.7.26"
|
||||||
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)
|
||||||
|
|
|
@ -59,6 +59,7 @@ from lib.core.dicts import DEPRECATED_OPTIONS
|
||||||
from lib.core.enums import AUTOCOMPLETE_TYPE
|
from lib.core.enums import AUTOCOMPLETE_TYPE
|
||||||
from lib.core.exception import SqlmapShellQuitException
|
from lib.core.exception import SqlmapShellQuitException
|
||||||
from lib.core.exception import SqlmapSyntaxException
|
from lib.core.exception import SqlmapSyntaxException
|
||||||
|
from lib.core.option import _createHomeDirectories
|
||||||
from lib.core.settings import BASIC_HELP_ITEMS
|
from lib.core.settings import BASIC_HELP_ITEMS
|
||||||
from lib.core.settings import DUMMY_URL
|
from lib.core.settings import DUMMY_URL
|
||||||
from lib.core.settings import INFERENCE_UNKNOWN_CHAR
|
from lib.core.settings import INFERENCE_UNKNOWN_CHAR
|
||||||
|
@ -829,6 +830,8 @@ def cmdLineParser(argv=None):
|
||||||
prompt = "--sqlmap-shell" in argv
|
prompt = "--sqlmap-shell" in argv
|
||||||
|
|
||||||
if prompt:
|
if prompt:
|
||||||
|
_createHomeDirectories()
|
||||||
|
|
||||||
parser.usage = ""
|
parser.usage = ""
|
||||||
cmdLineOptions.sqlmapShell = True
|
cmdLineOptions.sqlmapShell = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user