mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-02 20:54:13 +03:00
Another fix (related to the last commit)
This commit is contained in:
parent
071f4c8a2b
commit
c200b2cb19
|
@ -695,8 +695,6 @@ def paramToDict(place, parameters=None):
|
||||||
|
|
||||||
def getManualDirectories():
|
def getManualDirectories():
|
||||||
directories = None
|
directories = None
|
||||||
pagePath = directoryPath(conf.path)
|
|
||||||
|
|
||||||
defaultDocRoot = DEFAULT_DOC_ROOTS.get(Backend.getOs(), DEFAULT_DOC_ROOTS[OS.LINUX])
|
defaultDocRoot = DEFAULT_DOC_ROOTS.get(Backend.getOs(), DEFAULT_DOC_ROOTS[OS.LINUX])
|
||||||
|
|
||||||
if kb.absFilePaths:
|
if kb.absFilePaths:
|
||||||
|
@ -714,18 +712,18 @@ def getManualDirectories():
|
||||||
windowsDriveLetter, absFilePath = absFilePath[:2], absFilePath[2:]
|
windowsDriveLetter, absFilePath = absFilePath[:2], absFilePath[2:]
|
||||||
absFilePath = ntToPosixSlashes(posixToNtSlashes(absFilePath))
|
absFilePath = ntToPosixSlashes(posixToNtSlashes(absFilePath))
|
||||||
|
|
||||||
if any("/%s/" % _ in absFilePath for _ in GENERIC_DOC_ROOT_DIRECTORY_NAMES):
|
for _ in list(GENERIC_DOC_ROOT_DIRECTORY_NAMES) + [conf.hostname]:
|
||||||
for _ in GENERIC_DOC_ROOT_DIRECTORY_NAMES:
|
_ = "/%s/" % _
|
||||||
_ = "/%s/" % _
|
|
||||||
|
|
||||||
if _ in absFilePath:
|
if _ in absFilePath:
|
||||||
directories = "%s%s" % (absFilePath.split(_)[0], _)
|
directories = "%s%s" % (absFilePath.split(_)[0], _)
|
||||||
break
|
break
|
||||||
|
|
||||||
if pagePath and pagePath in absFilePath:
|
if not directories and conf.path.strip('/') and conf.path in absFilePath:
|
||||||
directories = absFilePath.split(pagePath)[0]
|
directories = absFilePath.split(conf.path)[0]
|
||||||
if windowsDriveLetter:
|
|
||||||
directories = "%s/%s" % (windowsDriveLetter, ntToPosixSlashes(directories))
|
if directories and windowsDriveLetter:
|
||||||
|
directories = "%s/%s" % (windowsDriveLetter, ntToPosixSlashes(directories))
|
||||||
|
|
||||||
directories = normalizePath(directories)
|
directories = normalizePath(directories)
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||||
from lib.core.revision import getRevisionNumber
|
from lib.core.revision import getRevisionNumber
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.0.7.23"
|
VERSION = "1.0.7.24"
|
||||||
REVISION = getRevisionNumber()
|
REVISION = getRevisionNumber()
|
||||||
STABLE = VERSION.count('.') <= 2
|
STABLE = VERSION.count('.') <= 2
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
|
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
|
||||||
|
|
|
@ -217,8 +217,6 @@ class Web:
|
||||||
|
|
||||||
if not isWindowsDriveLetterPath(directory) and not directory.startswith('/'):
|
if not isWindowsDriveLetterPath(directory) and not directory.startswith('/'):
|
||||||
directory = "/%s" % directory
|
directory = "/%s" % directory
|
||||||
else:
|
|
||||||
directory = directory[2:] if isWindowsDriveLetterPath(directory) else directory
|
|
||||||
|
|
||||||
if not directory.endswith('/'):
|
if not directory.endswith('/'):
|
||||||
directory += '/'
|
directory += '/'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user