File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,13 +68,13 @@ def parseResponse(page, headers):
6868 # Detect injectable page absolute system path
6969 # NOTE: this regular expression works if the remote web application
7070 # is written in PHP and debug/error messages are enabled.
71- absFilePathsRegExp = ( r" in <b>(.*?)</b> on line" , r"\b[A-Za-z]:(\\[\w.\\]*)?" , r"/[/\w.]+" )
71+ absFilePathsRegExp = ( r" in <b>(?P<result> .*?)</b> on line" , r"\b(?P<result> [A-Za-z]:(\\[\w.\\]*)?) " , r"(\A|[^<])(?P<result> /[/\w.]+) " )
7272
7373 for absFilePathRegExp in absFilePathsRegExp :
7474 reobj = re .compile (absFilePathRegExp )
7575
7676 for match in reobj .finditer (page ):
77- absFilePath = match .group ()
77+ absFilePath = match .group ("result" )
7878
7979 if absFilePath not in kb .absFilePaths :
8080 kb .absFilePaths .add (os .path .dirname (absFilePath ))
You can’t perform that action at this time.
0 commit comments