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

Skip to content

Commit 65c305c

Browse files
committed
Fixes #2174
1 parent 9a5fc5c commit 65c305c

4 files changed

Lines changed: 17 additions & 12 deletions

File tree

lib/core/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,7 @@ def setPaths(rootPath):
12001200
paths.SQLMAP_XML_PAYLOADS_PATH = os.path.join(paths.SQLMAP_XML_PATH, "payloads")
12011201

12021202
_ = os.path.join(os.path.expandvars(os.path.expanduser("~")), ".sqlmap")
1203+
paths.SQLMAP_HOME_PATH = _
12031204
paths.SQLMAP_OUTPUT_PATH = getUnicode(paths.get("SQLMAP_OUTPUT_PATH", os.path.join(_, "output")), encoding=sys.getfilesystemencoding() or UNICODE_ENCODING)
12041205
paths.SQLMAP_DUMP_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "dump")
12051206
paths.SQLMAP_FILES_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "files")

lib/core/option.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,6 +1566,7 @@ def _createTemporaryDirectory():
15661566
os.makedirs(conf.tmpDir)
15671567

15681568
_ = os.path.join(conf.tmpDir, randomStr())
1569+
15691570
open(_, "w+b").close()
15701571
os.remove(_)
15711572

@@ -1581,16 +1582,19 @@ def _createTemporaryDirectory():
15811582
try:
15821583
if not os.path.isdir(tempfile.gettempdir()):
15831584
os.makedirs(tempfile.gettempdir())
1584-
except IOError, ex:
1585-
errMsg = "there has been a problem while accessing "
1586-
errMsg += "system's temporary directory location(s) ('%s'). Please " % getSafeExString(ex)
1587-
errMsg += "make sure that there is enough disk space left. If problem persists, "
1588-
errMsg += "try to set environment variable 'TEMP' to a location "
1589-
errMsg += "writeable by the current user"
1590-
raise SqlmapSystemException, errMsg
1585+
except (OSError, IOError), ex:
1586+
warnMsg = "there has been a problem while accessing "
1587+
warnMsg += "system's temporary directory location(s) ('%s'). Please " % getSafeExString(ex)
1588+
warnMsg += "make sure that there is enough disk space left. If problem persists, "
1589+
warnMsg += "try to set environment variable 'TEMP' to a location "
1590+
warnMsg += "writeable by the current user"
1591+
logger.warn(warnMsg)
15911592

15921593
if "sqlmap" not in (tempfile.tempdir or "") or conf.tmpDir and tempfile.tempdir == conf.tmpDir:
1593-
tempfile.tempdir = tempfile.mkdtemp(prefix="sqlmap", suffix=str(os.getpid()))
1594+
try:
1595+
tempfile.tempdir = tempfile.mkdtemp(prefix="sqlmap", suffix=str(os.getpid()))
1596+
except (OSError, IOError), ex:
1597+
tempfile.tempdir = os.path.join(paths.SQLMAP_HOME_PATH, "tmp", "sqlmap%s%d" % (randomStr(6), os.getpid()))
15941598

15951599
kb.tempDir = tempfile.tempdir
15961600

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.revision import getRevisionNumber
2020

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

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ cc9c82cfffd8ee9b25ba3af6284f057e extra/sqlharvest/__init__.py
2626
cc9c82cfffd8ee9b25ba3af6284f057e lib/controller/__init__.py
2727
ed9303846f0bc63a9c518a7164301f80 lib/core/agent.py
2828
eb0bd28b0bd9fbf67dcc3119116df377 lib/core/bigarray.py
29-
d11993cd69f919216a9e4d54c77bb020 lib/core/common.py
29+
33b28a65ab1a9467203f63d798fd9ddf lib/core/common.py
3030
5680d0c446a3bed5c0f2a0402d031557 lib/core/convert.py
3131
e77cca1cb063016f71f6e6bdebf4ec73 lib/core/data.py
3232
1d042f0bc0557d3fd564ea5a46deb77e lib/core/datatype.py
@@ -39,13 +39,13 @@ e4aec2b11c1ad6039d0c3dbbfbc5eb1a lib/core/exception.py
3939
cc9c82cfffd8ee9b25ba3af6284f057e lib/core/__init__.py
4040
91c514013daa796e2cdd940389354eac lib/core/log.py
4141
b9779615206791e6ebbaa84947842b49 lib/core/optiondict.py
42-
1c6b49baa9aaac11b9e85be274ce2ecc lib/core/option.py
42+
fc390372373b5471b75145f6af4f11bd lib/core/option.py
4343
1e8948dddbd12def5c2af52530738059 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-
3808e1bfe1652f1b7579660e1f71262f lib/core/settings.py
48+
cd9b01d243acb9c70401c7456ad29567 lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
0bc2fae1dec18cdd11954b22358293f2 lib/core/target.py

0 commit comments

Comments
 (0)