From a6674edf8a0668680f6049669a82f1bcdf530449 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 9 Feb 2010 13:01:08 +0000 Subject: [PATCH] regular expressions revisited --- lib/request/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request/basic.py b/lib/request/basic.py index 1e00ec5f5..410aee760 100644 --- a/lib/request/basic.py +++ b/lib/request/basic.py @@ -75,7 +75,7 @@ def parseResponse(page, headers): # Detect injectable page absolute system path # NOTE: this regular expression works if the remote web application # is written in PHP and debug/error messages are enabled. - absFilePathsRegExp = ( r" in (?P.*?) on line", r"\b(?P[A-Za-z]:([\\/][\w.\\/]*)?)", r"(\A|[^<])(?P/[/\w.]+)" ) + absFilePathsRegExp = ( r" in (?P.*?) on line", r"(?:>|\s)(?P[A-Za-z]:[\\/][\w.\\/]*)", r"(?:>|\s)(?P/\w[/\w.]+)" ) for absFilePathRegExp in absFilePathsRegExp: reobj = re.compile(absFilePathRegExp)