Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c200b2c

Browse files
committed
Another fix (related to the last commit)
1 parent 071f4c8 commit c200b2c

3 files changed

Lines changed: 11 additions & 15 deletions

File tree

lib/core/common.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -695,8 +695,6 @@ def walk(head, current=None):
695695

696696
def getManualDirectories():
697697
directories = None
698-
pagePath = directoryPath(conf.path)
699-
700698
defaultDocRoot = DEFAULT_DOC_ROOTS.get(Backend.getOs(), DEFAULT_DOC_ROOTS[OS.LINUX])
701699

702700
if kb.absFilePaths:
@@ -714,18 +712,18 @@ def getManualDirectories():
714712
windowsDriveLetter, absFilePath = absFilePath[:2], absFilePath[2:]
715713
absFilePath = ntToPosixSlashes(posixToNtSlashes(absFilePath))
716714

717-
if any("/%s/" % _ in absFilePath for _ in GENERIC_DOC_ROOT_DIRECTORY_NAMES):
718-
for _ in GENERIC_DOC_ROOT_DIRECTORY_NAMES:
719-
_ = "/%s/" % _
715+
for _ in list(GENERIC_DOC_ROOT_DIRECTORY_NAMES) + [conf.hostname]:
716+
_ = "/%s/" % _
720717

721-
if _ in absFilePath:
722-
directories = "%s%s" % (absFilePath.split(_)[0], _)
723-
break
718+
if _ in absFilePath:
719+
directories = "%s%s" % (absFilePath.split(_)[0], _)
720+
break
721+
722+
if not directories and conf.path.strip('/') and conf.path in absFilePath:
723+
directories = absFilePath.split(conf.path)[0]
724724

725-
if pagePath and pagePath in absFilePath:
726-
directories = absFilePath.split(pagePath)[0]
727-
if windowsDriveLetter:
728-
directories = "%s/%s" % (windowsDriveLetter, ntToPosixSlashes(directories))
725+
if directories and windowsDriveLetter:
726+
directories = "%s/%s" % (windowsDriveLetter, ntToPosixSlashes(directories))
729727

730728
directories = normalizePath(directories)
731729

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.7.23"
22+
VERSION = "1.0.7.24"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

lib/takeover/web.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,6 @@ def webInit(self):
217217

218218
if not isWindowsDriveLetterPath(directory) and not directory.startswith('/'):
219219
directory = "/%s" % directory
220-
else:
221-
directory = directory[2:] if isWindowsDriveLetterPath(directory) else directory
222220

223221
if not directory.endswith('/'):
224222
directory += '/'

0 commit comments

Comments
 (0)