mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
more user friendliness/handiness for users which mix Linux and Windows paths where they shouldn't do that
This commit is contained in:
parent
845618934d
commit
0bb7d715a7
|
@ -10,6 +10,7 @@ See the file 'doc/COPYING' for copying permission
|
|||
import binascii
|
||||
import codecs
|
||||
import os
|
||||
import re
|
||||
|
||||
from lib.core.agent import agent
|
||||
from lib.core.common import dataToOutFile
|
||||
|
@ -21,7 +22,9 @@ from lib.core.data import conf
|
|||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.enums import DBMS
|
||||
from lib.core.enums import OS
|
||||
from lib.core.enums import PAYLOAD
|
||||
from lib.core.exception import sqlmapFilePathException
|
||||
from lib.core.exception import sqlmapUndefinedMethod
|
||||
from lib.request import inject
|
||||
|
||||
|
@ -263,6 +266,12 @@ class Filesystem:
|
|||
|
||||
self.checkDbmsOs()
|
||||
|
||||
if Backend.isOs(OS.WINDOWS) and not re.search(r'\A[A-Z]:\\', rFile, re.I) or\
|
||||
Backend.isOs(OS.LINUX) and not rFile.startswith('/'):
|
||||
errMsg = "invalid file path used for the underlying operating "
|
||||
errMsg += "system '%s' of the back-end '%s' server ('%s')" % (Backend.getOs(), Backend.getDbms(), rFile)
|
||||
raise sqlmapFilePathException, errMsg
|
||||
|
||||
if conf.direct or isTechniqueAvailable(PAYLOAD.TECHNIQUE.STACKED):
|
||||
if isTechniqueAvailable(PAYLOAD.TECHNIQUE.STACKED):
|
||||
debugMsg = "going to read the file with stacked query SQL "
|
||||
|
|
Loading…
Reference in New Issue
Block a user