mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 02:53:46 +03:00
Patch regarding Issue #774 (SELECT is redundant in case of LOAD_FILE)
This commit is contained in:
parent
0fb576724e
commit
30fb8e8a50
|
@ -29,7 +29,7 @@ class Filesystem(GenericFilesystem):
|
||||||
infoMsg = "fetching file: '%s'" % rFile
|
infoMsg = "fetching file: '%s'" % rFile
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
result = inject.getValue("SELECT HEX(LOAD_FILE('%s'))" % rFile, charsetType=CHARSET_TYPE.HEXADECIMAL)
|
result = inject.getValue("HEX(LOAD_FILE('%s'))" % rFile, charsetType=CHARSET_TYPE.HEXADECIMAL)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ class Filesystem:
|
||||||
|
|
||||||
def _checkFileLength(self, localFile, remoteFile, fileRead=False):
|
def _checkFileLength(self, localFile, remoteFile, fileRead=False):
|
||||||
if Backend.isDbms(DBMS.MYSQL):
|
if Backend.isDbms(DBMS.MYSQL):
|
||||||
lengthQuery = "SELECT LENGTH(LOAD_FILE('%s'))" % remoteFile
|
lengthQuery = "LENGTH(LOAD_FILE('%s'))" % remoteFile
|
||||||
|
|
||||||
elif Backend.isDbms(DBMS.PGSQL) and not fileRead:
|
elif Backend.isDbms(DBMS.PGSQL) and not fileRead:
|
||||||
lengthQuery = "SELECT LENGTH(data) FROM pg_largeobject WHERE loid=%d" % self.oid
|
lengthQuery = "SELECT LENGTH(data) FROM pg_largeobject WHERE loid=%d" % self.oid
|
||||||
|
|
Loading…
Reference in New Issue
Block a user