mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-09 08:00:36 +03:00
Fixes #2174
This commit is contained in:
parent
9a5fc5ccf4
commit
65c305cff0
|
@ -1200,6 +1200,7 @@ def setPaths(rootPath):
|
||||||
paths.SQLMAP_XML_PAYLOADS_PATH = os.path.join(paths.SQLMAP_XML_PATH, "payloads")
|
paths.SQLMAP_XML_PAYLOADS_PATH = os.path.join(paths.SQLMAP_XML_PATH, "payloads")
|
||||||
|
|
||||||
_ = os.path.join(os.path.expandvars(os.path.expanduser("~")), ".sqlmap")
|
_ = os.path.join(os.path.expandvars(os.path.expanduser("~")), ".sqlmap")
|
||||||
|
paths.SQLMAP_HOME_PATH = _
|
||||||
paths.SQLMAP_OUTPUT_PATH = getUnicode(paths.get("SQLMAP_OUTPUT_PATH", os.path.join(_, "output")), encoding=sys.getfilesystemencoding() or UNICODE_ENCODING)
|
paths.SQLMAP_OUTPUT_PATH = getUnicode(paths.get("SQLMAP_OUTPUT_PATH", os.path.join(_, "output")), encoding=sys.getfilesystemencoding() or UNICODE_ENCODING)
|
||||||
paths.SQLMAP_DUMP_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "dump")
|
paths.SQLMAP_DUMP_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "dump")
|
||||||
paths.SQLMAP_FILES_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "files")
|
paths.SQLMAP_FILES_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "files")
|
||||||
|
|
|
@ -1566,6 +1566,7 @@ def _createTemporaryDirectory():
|
||||||
os.makedirs(conf.tmpDir)
|
os.makedirs(conf.tmpDir)
|
||||||
|
|
||||||
_ = os.path.join(conf.tmpDir, randomStr())
|
_ = os.path.join(conf.tmpDir, randomStr())
|
||||||
|
|
||||||
open(_, "w+b").close()
|
open(_, "w+b").close()
|
||||||
os.remove(_)
|
os.remove(_)
|
||||||
|
|
||||||
|
@ -1581,16 +1582,19 @@ def _createTemporaryDirectory():
|
||||||
try:
|
try:
|
||||||
if not os.path.isdir(tempfile.gettempdir()):
|
if not os.path.isdir(tempfile.gettempdir()):
|
||||||
os.makedirs(tempfile.gettempdir())
|
os.makedirs(tempfile.gettempdir())
|
||||||
except IOError, ex:
|
except (OSError, IOError), ex:
|
||||||
errMsg = "there has been a problem while accessing "
|
warnMsg = "there has been a problem while accessing "
|
||||||
errMsg += "system's temporary directory location(s) ('%s'). Please " % getSafeExString(ex)
|
warnMsg += "system's temporary directory location(s) ('%s'). Please " % getSafeExString(ex)
|
||||||
errMsg += "make sure that there is enough disk space left. If problem persists, "
|
warnMsg += "make sure that there is enough disk space left. If problem persists, "
|
||||||
errMsg += "try to set environment variable 'TEMP' to a location "
|
warnMsg += "try to set environment variable 'TEMP' to a location "
|
||||||
errMsg += "writeable by the current user"
|
warnMsg += "writeable by the current user"
|
||||||
raise SqlmapSystemException, errMsg
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
if "sqlmap" not in (tempfile.tempdir or "") or conf.tmpDir and tempfile.tempdir == conf.tmpDir:
|
if "sqlmap" not in (tempfile.tempdir or "") or conf.tmpDir and tempfile.tempdir == conf.tmpDir:
|
||||||
|
try:
|
||||||
tempfile.tempdir = tempfile.mkdtemp(prefix="sqlmap", suffix=str(os.getpid()))
|
tempfile.tempdir = tempfile.mkdtemp(prefix="sqlmap", suffix=str(os.getpid()))
|
||||||
|
except (OSError, IOError), ex:
|
||||||
|
tempfile.tempdir = os.path.join(paths.SQLMAP_HOME_PATH, "tmp", "sqlmap%s%d" % (randomStr(6), os.getpid()))
|
||||||
|
|
||||||
kb.tempDir = tempfile.tempdir
|
kb.tempDir = tempfile.tempdir
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||||
from lib.core.revision import getRevisionNumber
|
from lib.core.revision import getRevisionNumber
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.0.9.28"
|
VERSION = "1.0.9.29"
|
||||||
REVISION = getRevisionNumber()
|
REVISION = getRevisionNumber()
|
||||||
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}
|
||||||
|
|
|
@ -26,7 +26,7 @@ cc9c82cfffd8ee9b25ba3af6284f057e extra/sqlharvest/__init__.py
|
||||||
cc9c82cfffd8ee9b25ba3af6284f057e lib/controller/__init__.py
|
cc9c82cfffd8ee9b25ba3af6284f057e lib/controller/__init__.py
|
||||||
ed9303846f0bc63a9c518a7164301f80 lib/core/agent.py
|
ed9303846f0bc63a9c518a7164301f80 lib/core/agent.py
|
||||||
eb0bd28b0bd9fbf67dcc3119116df377 lib/core/bigarray.py
|
eb0bd28b0bd9fbf67dcc3119116df377 lib/core/bigarray.py
|
||||||
d11993cd69f919216a9e4d54c77bb020 lib/core/common.py
|
33b28a65ab1a9467203f63d798fd9ddf lib/core/common.py
|
||||||
5680d0c446a3bed5c0f2a0402d031557 lib/core/convert.py
|
5680d0c446a3bed5c0f2a0402d031557 lib/core/convert.py
|
||||||
e77cca1cb063016f71f6e6bdebf4ec73 lib/core/data.py
|
e77cca1cb063016f71f6e6bdebf4ec73 lib/core/data.py
|
||||||
1d042f0bc0557d3fd564ea5a46deb77e lib/core/datatype.py
|
1d042f0bc0557d3fd564ea5a46deb77e lib/core/datatype.py
|
||||||
|
@ -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
|
||||||
b9779615206791e6ebbaa84947842b49 lib/core/optiondict.py
|
b9779615206791e6ebbaa84947842b49 lib/core/optiondict.py
|
||||||
1c6b49baa9aaac11b9e85be274ce2ecc lib/core/option.py
|
fc390372373b5471b75145f6af4f11bd lib/core/option.py
|
||||||
1e8948dddbd12def5c2af52530738059 lib/core/profiling.py
|
1e8948dddbd12def5c2af52530738059 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
|
||||||
3808e1bfe1652f1b7579660e1f71262f lib/core/settings.py
|
cd9b01d243acb9c70401c7456ad29567 lib/core/settings.py
|
||||||
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
|
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
|
||||||
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
|
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
|
||||||
0bc2fae1dec18cdd11954b22358293f2 lib/core/target.py
|
0bc2fae1dec18cdd11954b22358293f2 lib/core/target.py
|
||||||
|
|
Loading…
Reference in New Issue
Block a user