From 9d04ae5db5a7085aa01b5e6554dc0f957be6f3a5 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Tue, 5 Feb 2013 09:11:38 +0000 Subject: [PATCH] minor improvement to temporary folder name --- lib/core/testing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/testing.py b/lib/core/testing.py index 1d02bbfbe..bce8145ed 100644 --- a/lib/core/testing.py +++ b/lib/core/testing.py @@ -169,7 +169,7 @@ def liveTest(): msg = "running live test case: %s (%d/%d)" % (name, count, length) logger.info(msg) - initCase(switches) + initCase(switches, count) test_case_fd = codecs.open(os.path.join(paths.SQLMAP_OUTPUT_PATH, "test_case"), "wb", UNICODE_ENCODING) test_case_fd.write("%s\n" % name) @@ -224,7 +224,7 @@ def liveTest(): return retVal -def initCase(switches=None): +def initCase(switches, count): global failedItem global failedParseOn global failedTraceBack @@ -233,7 +233,7 @@ def initCase(switches=None): failedParseOn = None failedTraceBack = None - paths.SQLMAP_OUTPUT_PATH = tempfile.mkdtemp(prefix="sqlmaptest-") + paths.SQLMAP_OUTPUT_PATH = tempfile.mkdtemp(prefix="sqlmaptest-%d-" % count) 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")