mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 06:01:29 +00:00
Finally fixed and adapted all code around to the new isWindowsDriveLetterPath() function
This commit is contained in:
@@ -22,6 +22,7 @@ with sqlmap; if not, write to the Free Software Foundation, Inc., 51
|
||||
Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
"""
|
||||
|
||||
import ntpath
|
||||
import os
|
||||
|
||||
from lib.core.common import getRange
|
||||
@@ -146,8 +147,8 @@ class Filesystem(GenericFilesystem):
|
||||
|
||||
debugSize = 0xFF00
|
||||
tmpPath = posixToNtSlashes(conf.tmpPath)
|
||||
dFileName = os.path.split(dFile)[1]
|
||||
dFile = posixToNtSlashes(dFile)
|
||||
dFileName = ntpath.basename(dFile)
|
||||
wFileSize = os.path.getsize(wFile)
|
||||
wFilePointer = open(wFile, "rb")
|
||||
wFileContent = wFilePointer.read()
|
||||
|
||||
@@ -57,7 +57,7 @@ class Takeover(GenericTakeover):
|
||||
|
||||
# Reference: http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld_basedir
|
||||
self.__basedir = inject.getValue("SELECT @@basedir")
|
||||
self.__basedir = normalizePath(ntToPosixSlashes(self.__basedir))
|
||||
self.__basedir = ntToPosixSlashes(normalizePath(self.__basedir))
|
||||
|
||||
if re.search("^[\w]\:[\/\\\\]+", self.__basedir, re.I):
|
||||
kb.os = "Windows"
|
||||
@@ -78,7 +78,7 @@ class Takeover(GenericTakeover):
|
||||
# NOTE: specifying the relative path as './udf.dll'
|
||||
# saves in @@datadir on both MySQL 4.1 and MySQL 5.0
|
||||
self.__datadir = "."
|
||||
self.__datadir = normalizePath(ntToPosixSlashes(self.__datadir))
|
||||
self.__datadir = ntToPosixSlashes(normalizePath(self.__datadir))
|
||||
|
||||
if re.search("[\w]\:\/", self.__datadir, re.I):
|
||||
kb.os = "Windows"
|
||||
|
||||
Reference in New Issue
Block a user