File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ def getDocRoot():
235235 absFilePath = normalizePath (absFilePath )
236236 absFilePathWin = None
237237
238- if re .match ("[A-Za-z]:(\\ [\w.\\ ]*)?" , absFilePath ):
238+ if re .match ("[A-Za-z]:([ \\ /] [\w.\\ / ]*)?" , absFilePath ):
239239 absFilePathWin = absFilePath
240240 absFilePath = absFilePath [2 :].replace ("\\ " , "/" )
241241
Original file line number Diff line number Diff line change @@ -73,17 +73,18 @@ def parseResponse(page, headers):
7373 # Detect injectable page absolute system path
7474 # NOTE: this regular expression works if the remote web application
7575 # is written in PHP and debug/error messages are enabled.
76- absFilePathsRegExp = ( r" in <b>(?P<result>.*?)</b> on line" , r"\b(?P<result>[A-Za-z]:(\\ [\w.\\]*)?)" , r"(\A|[^<])(?P<result>/[/\w.]+)" )
76+ absFilePathsRegExp = ( r" in <b>(?P<result>.*?)</b> on line" , r"\b(?P<result>[A-Za-z]:([\\/] [\w.\\/ ]*)?)" , r"(\A|[^<])(?P<result>/[/\w.]+)" )
7777
7878 for absFilePathRegExp in absFilePathsRegExp :
7979 reobj = re .compile (absFilePathRegExp )
8080
8181 for match in reobj .finditer (page ):
8282 absFilePath = match .group ("result" ).strip ()
83-
83+ page = page . replace ( absFilePath , "" )
8484 if absFilePath not in kb .absFilePaths :
8585 dirname = directoryPath (absFilePath )
8686 kb .absFilePaths .add (dirname )
87+
8788
8889def decodePage (page , encoding ):
8990 """
You can’t perform that action at this time.
0 commit comments