mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-27 12:00:57 +00:00
some changes regarding web takeover
This commit is contained in:
parent
542b01993e
commit
00a23ace9a
2 changed files with 9 additions and 20 deletions
|
|
@ -232,6 +232,8 @@ def getDocRoot():
|
|||
|
||||
if kb.absFilePaths:
|
||||
for absFilePath in kb.absFilePaths:
|
||||
if directoryPath(absFilePath) == '/':
|
||||
continue
|
||||
absFilePath = normalizePath(absFilePath)
|
||||
absFilePathWin = None
|
||||
|
||||
|
|
@ -271,20 +273,22 @@ def getDirs():
|
|||
directories = set()
|
||||
|
||||
if kb.os == "Windows":
|
||||
defaultDir = "C:/Inetpub/wwwroot/test/"
|
||||
defaultDir = "C:/Inetpub/wwwroot/"
|
||||
else:
|
||||
defaultDir = "/var/www/test/"
|
||||
defaultDir = "/var/www/"
|
||||
|
||||
if kb.absFilePaths:
|
||||
infoMsg = "retrieved web server full paths: "
|
||||
infoMsg += "'%s'" % ", ".join(path for path in kb.absFilePaths)
|
||||
logger.info(infoMsg)
|
||||
|
||||
|
||||
for absFilePath in kb.absFilePaths:
|
||||
if absFilePath:
|
||||
directory = directoryPath(absFilePath)
|
||||
if isWindowsPath(directory):
|
||||
directory = directory.replace('\\', '/')
|
||||
if directory == '/':
|
||||
continue
|
||||
directories.add(directory)
|
||||
else:
|
||||
warnMsg = "unable to retrieve any web server path"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue