diff --git a/lib/core/bigarray.py b/lib/core/bigarray.py index 08b621433..0e42433d8 100644 --- a/lib/core/bigarray.py +++ b/lib/core/bigarray.py @@ -97,9 +97,12 @@ class BigArray(list): with open(filename, "w+b") as fp: pickle.dump(chunk, fp, pickle.HIGHEST_PROTOCOL) return filename - except IOError, ex: + except (OSError, IOError), ex: errMsg = "exception occurred while storing data " - errMsg += "to a temporary file ('%s')" % ex + errMsg += "to a temporary file ('%s'). Please " % ex + errMsg += "make sure that there is enough disk space left. If problem persists, " + errMsg += "try to set environment variable 'TEMP' to a location " + errMsg += "writeable by the current user" raise SqlmapSystemException, errMsg def _checkcache(self, index): diff --git a/lib/core/option.py b/lib/core/option.py index 6ab4e8d93..29b06c434 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1450,9 +1450,10 @@ def _createTemporaryDirectory(): errMsg = "there has been a problem while accessing " errMsg += "system's temporary directory location(s) ('%s'). Please " % ex errMsg += "make sure that there is enough disk space left. If problem persists, " - errMsg += "try to set environment variable 'TMP' to a location " + errMsg += "try to set environment variable 'TEMP' to a location " errMsg += "writeable by the current user" raise SqlmapSystemException, errMsg + kb.tempDir = tempfile.tempdir = tempfile.mkdtemp(prefix="sqlmap", suffix=str(os.getpid())) if not os.path.isdir(tempfile.tempdir): os.makedirs(tempfile.tempdir)