mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 13:03:50 +03:00
found and fixed few bugs regarding my "fix" of Bug #110
This commit is contained in:
parent
d5b1863dec
commit
96a033b51d
|
@ -68,13 +68,13 @@ def parseResponse(page, headers):
|
||||||
# Detect injectable page absolute system path
|
# Detect injectable page absolute system path
|
||||||
# NOTE: this regular expression works if the remote web application
|
# NOTE: this regular expression works if the remote web application
|
||||||
# is written in PHP and debug/error messages are enabled.
|
# is written in PHP and debug/error messages are enabled.
|
||||||
absFilePathsRegExp = ( r" in <b>(.*?)</b> on line", r"\b[A-Za-z]:(\\[\w.\\]*)?", r"/[/\w.]+" )
|
absFilePathsRegExp = ( r" in <b>(?P<result>.*?)</b> on line", r"\b(?P<result>[A-Za-z]:(\\[\w.\\]*)?)", r"(\A|[^<])(?P<result>/[/\w.]+)" )
|
||||||
|
|
||||||
for absFilePathRegExp in absFilePathsRegExp:
|
for absFilePathRegExp in absFilePathsRegExp:
|
||||||
reobj = re.compile(absFilePathRegExp)
|
reobj = re.compile(absFilePathRegExp)
|
||||||
|
|
||||||
for match in reobj.finditer(page):
|
for match in reobj.finditer(page):
|
||||||
absFilePath = match.group()
|
absFilePath = match.group("result")
|
||||||
|
|
||||||
if absFilePath not in kb.absFilePaths:
|
if absFilePath not in kb.absFilePaths:
|
||||||
kb.absFilePaths.add(os.path.dirname(absFilePath))
|
kb.absFilePaths.add(os.path.dirname(absFilePath))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user