mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-02-12 00:16:37 +00:00
Finally fixed and adapted all code around to the new isWindowsDriveLetterPath() function
This commit is contained in:
@@ -36,6 +36,7 @@ from lib.core.common import dataToStdout
|
||||
from lib.core.common import getLocalIP
|
||||
from lib.core.common import getRemoteIP
|
||||
from lib.core.common import normalizePath
|
||||
from lib.core.common import ntToPosixSlashes
|
||||
from lib.core.common import pollProcess
|
||||
from lib.core.common import randomRange
|
||||
from lib.core.common import randomStr
|
||||
@@ -635,7 +636,7 @@ class Metasploit:
|
||||
else:
|
||||
self.exeFilePathRemote = "%s/%s" % (conf.tmpPath, os.path.basename(self.exeFilePathLocal))
|
||||
|
||||
self.exeFilePathRemote = normalizePath(self.exeFilePathRemote)
|
||||
self.exeFilePathRemote = ntToPosixSlashes(normalizePath(self.exeFilePathRemote))
|
||||
|
||||
logger.info("uploading payload stager to '%s'" % self.exeFilePathRemote)
|
||||
|
||||
|
||||
@@ -178,12 +178,16 @@ class Web:
|
||||
# Upload the uploader agent
|
||||
self.__webFileInject(uploaderContent, uploaderName, directory)
|
||||
requestDir = ntToPosixSlashes(directory)
|
||||
|
||||
if requestDir[-1] != '/':
|
||||
requestDir += '/'
|
||||
requestDir = requestDir.replace(ntToPosixSlashes(kb.docRoot), "/")
|
||||
|
||||
requestDir = requestDir.replace(ntToPosixSlashes(kb.docRoot), "/")
|
||||
|
||||
if isWindowsDriveLetterPath(requestDir):
|
||||
requestDir = requestDir[2:]
|
||||
requestDir = normalizePath(requestDir)
|
||||
|
||||
requestDir = normalizePath(requestDir)
|
||||
|
||||
self.webBaseUrl = "%s://%s:%d%s" % (conf.scheme, conf.hostname, conf.port, requestDir)
|
||||
self.webUploaderUrl = "%s/%s" % (self.webBaseUrl.rstrip('/'), uploaderName)
|
||||
|
||||
Reference in New Issue
Block a user