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

Skip to content

Commit d546fc5

Browse files
committed
slight update to regression test regexp
1 parent 9a1be29 commit d546fc5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

extra/shutils/regressiontest.py

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
# Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
3+
# Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/)
44
# See the file 'doc/COPYING' for copying permission
55

66
import codecs
@@ -77,13 +77,13 @@ def main():
7777
if stderr:
7878
failure_email("Update of sqlmap failed with error:\n\n%s" % stderr)
7979

80-
regressionproc = subprocess.Popen("python /opt/sqlmap/sqlmap.py --live-test", shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=False)
80+
regressionproc = subprocess.Popen("python /opt/sqlmap/sqlmap.py --live-test --run-case 'MySQL UNION query multi-threaded enumeration'", shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=False)
8181
stdout, stderr = regressionproc.communicate()
8282

8383
if stderr:
8484
failure_email("Execution of regression test failed with error:\n\n%s" % stderr)
8585

86-
failed_tests = re.findall("running live test case: (.+?) \((\d+)\/\d+\)[\r]*\n.+test failed (at parsing item \"(.+)\" )?\- scan folder: (\/.+) \- traceback: (.*?)( - SQL injection not detected)?[\r]*\n", stdout, re.M)
86+
failed_tests = re.findall("running live test case: (.+?) \((\d+)\/\d+\)[\r]*\n.+test failed (at parsing items: (.+))?\s*\- scan folder: (\/.+) \- traceback: (.*?)( - SQL injection not detected)?[\r]*\n", stdout, re.M)
8787

8888
for failed_test in failed_tests:
8989
title = failed_test[0]

0 commit comments

Comments
 (0)