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

Skip to content

Commit 570d307

Browse files
committed
Patch for an Issue #1113
1 parent c8787e0 commit 570d307

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

lib/core/bigarray.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,12 @@ def _dump(self, chunk):
9797
with open(filename, "w+b") as fp:
9898
pickle.dump(chunk, fp, pickle.HIGHEST_PROTOCOL)
9999
return filename
100-
except IOError, ex:
100+
except (OSError, IOError), ex:
101101
errMsg = "exception occurred while storing data "
102-
errMsg += "to a temporary file ('%s')" % ex
102+
errMsg += "to a temporary file ('%s'). Please " % ex
103+
errMsg += "make sure that there is enough disk space left. If problem persists, "
104+
errMsg += "try to set environment variable 'TEMP' to a location "
105+
errMsg += "writeable by the current user"
103106
raise SqlmapSystemException, errMsg
104107

105108
def _checkcache(self, index):

lib/core/option.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1450,9 +1450,10 @@ def _createTemporaryDirectory():
14501450
errMsg = "there has been a problem while accessing "
14511451
errMsg += "system's temporary directory location(s) ('%s'). Please " % ex
14521452
errMsg += "make sure that there is enough disk space left. If problem persists, "
1453-
errMsg += "try to set environment variable 'TMP' to a location "
1453+
errMsg += "try to set environment variable 'TEMP' to a location "
14541454
errMsg += "writeable by the current user"
14551455
raise SqlmapSystemException, errMsg
1456+
14561457
kb.tempDir = tempfile.tempdir = tempfile.mkdtemp(prefix="sqlmap", suffix=str(os.getpid()))
14571458
if not os.path.isdir(tempfile.tempdir):
14581459
os.makedirs(tempfile.tempdir)

0 commit comments

Comments
 (0)