From 4727589135a40612a0b83dec79bf7e0feaf3c68d Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Fri, 15 Feb 2013 00:17:13 +0000 Subject: [PATCH] code consistency --- lib/core/bigarray.py | 2 +- lib/core/common.py | 2 +- lib/core/target.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/core/bigarray.py b/lib/core/bigarray.py index eb07318b8..85f64ddb8 100644 --- a/lib/core/bigarray.py +++ b/lib/core/bigarray.py @@ -58,7 +58,7 @@ class BigArray(list): return ValueError, "%s is not in list" % value def _dump(self, value): - handle, filename = tempfile.mkstemp() + handle, filename = tempfile.mkstemp(prefix="sqlmapba-") self.filenames.add(filename) os.close(handle) with open(filename, "w+b") as fp: diff --git a/lib/core/common.py b/lib/core/common.py index a4dfdada4..d4e1158f1 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -3380,7 +3380,7 @@ def resetCookieJar(cookieJar): content = readCachedFileContent(conf.loadCookies) lines = filter(None, (line.strip() for line in content.split("\n") if not line.startswith('#'))) - handle, filename = tempfile.mkstemp() + handle, filename = tempfile.mkstemp(prefix="sqlmapcj-") os.close(handle) with open(filename, "w+b") as f: diff --git a/lib/core/target.py b/lib/core/target.py index 088c2a1f6..8b5c029f4 100644 --- a/lib/core/target.py +++ b/lib/core/target.py @@ -467,7 +467,7 @@ def _createTargetDirs(): try: os.makedirs(paths.SQLMAP_OUTPUT_PATH, 0755) except OSError, ex: - tempDir = tempfile.mkdtemp(prefix='output') + tempDir = tempfile.mkdtemp(prefix="sqlmapoutput") warnMsg = "unable to create default root output directory " warnMsg += "'%s' (%s). " % (paths.SQLMAP_OUTPUT_PATH, ex) warnMsg += "using temporary directory '%s' instead" % tempDir @@ -481,7 +481,7 @@ def _createTargetDirs(): try: os.makedirs(conf.outputPath, 0755) except OSError, ex: - tempDir = tempfile.mkdtemp(prefix='output') + tempDir = tempfile.mkdtemp(prefix="sqlmapoutput") warnMsg = "unable to create output directory " warnMsg += "'%s' (%s). " % (conf.outputPath, ex) warnMsg += "using temporary directory '%s' instead" % tempDir