minor enhancements - issue #311

This commit is contained in:
Bernardo Damele 2013-01-18 13:33:05 +00:00
parent 50d7386012
commit 7ccdfc7244

View File

@ -27,7 +27,7 @@ CONTENT = ""
TEST_COUNTS = [] TEST_COUNTS = []
ATTACHMENTS = {} ATTACHMENTS = {}
command_line = "cd ../../ ; rm -f $REGRESSION_FILE ; python sqlmap.py --live-test --run-case 'Invalid logic'" command_line = "cd ../../ ; rm -f $REGRESSION_FILE ; python sqlmap.py --live-test --run-case 'Invalid'"
proc = subprocess.Popen(command_line, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) proc = subprocess.Popen(command_line, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
proc.wait() proc.wait()
stdout, stderr = proc.communicate() stdout, stderr = proc.communicate()
@ -62,19 +62,21 @@ for failed_test in failed_tests:
if parse: if parse:
CONTENT += " at parsing: %s:\n\n" % parse CONTENT += " at parsing: %s:\n\n" % parse
CONTENT += "### LOG FILE:\n\n" CONTENT += "### Log file:\n\n"
CONTENT += "%s\n" % log CONTENT += "%s\n" % log
elif not detected: elif not detected:
CONTENT += " - SQL injection not detected\n\n" CONTENT += " - SQL injection not detected\n\n"
if traceback: if traceback:
CONTENT += "### TRACEBACK:\n\n" CONTENT += "### Traceback:\n\n"
CONTENT += "%s\n" % str(traceback) CONTENT += "%s\n" % str(traceback)
CONTENT += "\n#######################################\n\n" CONTENT += "#######################################################################\n\n"
if CONTENT: if CONTENT:
SUBJECT += " (%s)" % ", ".join("#%d" % count for count in TEST_COUNTS) SUBJECT += " (%s)" % ", ".join("#%d" % count for count in TEST_COUNTS)
CONTENT += "\n\nRegression test finished at %s" % time.strftime("%H:%M:%S %d-%m-%Y", time.gmtime())
msg = MIMEMultipart() msg = MIMEMultipart()
msg["Subject"] = SUBJECT msg["Subject"] = SUBJECT
msg["From"] = FROM msg["From"] = FROM