mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
Minor consistency patch
This commit is contained in:
parent
69563fc24f
commit
41c21ab7f2
|
@ -55,10 +55,10 @@ class Filesystem:
|
||||||
localFileSize = os.path.getsize(localFile)
|
localFileSize = os.path.getsize(localFile)
|
||||||
|
|
||||||
if fileRead and Backend.isDbms(DBMS.PGSQL):
|
if fileRead and Backend.isDbms(DBMS.PGSQL):
|
||||||
logger.info("length of read file %s cannot be checked on PostgreSQL" % remoteFile)
|
logger.info("length of read file '%s' cannot be checked on PostgreSQL" % remoteFile)
|
||||||
sameFile = True
|
sameFile = True
|
||||||
else:
|
else:
|
||||||
logger.debug("checking the length of the remote file %s" % remoteFile)
|
logger.debug("checking the length of the remote file '%s'" % remoteFile)
|
||||||
remoteFileSize = inject.getValue(lengthQuery, resumeValue=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS)
|
remoteFileSize = inject.getValue(lengthQuery, resumeValue=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS)
|
||||||
sameFile = None
|
sameFile = None
|
||||||
|
|
||||||
|
@ -69,14 +69,14 @@ class Filesystem:
|
||||||
|
|
||||||
if localFileSize == remoteFileSize:
|
if localFileSize == remoteFileSize:
|
||||||
sameFile = True
|
sameFile = True
|
||||||
infoMsg = "the local file %s and the remote file " % localFile
|
infoMsg = "the local file '%s' and the remote file " % localFile
|
||||||
infoMsg += "%s have the same size (%dB)" % (remoteFile, localFileSize)
|
infoMsg += "'%s' have the same size (%dB)" % (remoteFile, localFileSize)
|
||||||
elif remoteFileSize > localFileSize:
|
elif remoteFileSize > localFileSize:
|
||||||
infoMsg = "the remote file %s is larger (%dB) than " % (remoteFile, remoteFileSize)
|
infoMsg = "the remote file '%s' is larger (%dB) than " % (remoteFile, remoteFileSize)
|
||||||
infoMsg += "the local file %s (%dB)" % (localFile, localFileSize)
|
infoMsg += "the local file '%s' (%dB)" % (localFile, localFileSize)
|
||||||
else:
|
else:
|
||||||
infoMsg = "the remote file %s is smaller (%dB) than " % (remoteFile, remoteFileSize)
|
infoMsg = "the remote file '%s' is smaller (%dB) than " % (remoteFile, remoteFileSize)
|
||||||
infoMsg += "file %s (%dB)" % (localFile, localFileSize)
|
infoMsg += "file '%s' (%dB)" % (localFile, localFileSize)
|
||||||
|
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
else:
|
else:
|
||||||
|
@ -153,7 +153,7 @@ class Filesystem:
|
||||||
if forceCheck is not True:
|
if forceCheck is not True:
|
||||||
message = "do you want confirmation that the local file '%s' " % localFile
|
message = "do you want confirmation that the local file '%s' " % localFile
|
||||||
message += "has been successfully written on the back-end DBMS "
|
message += "has been successfully written on the back-end DBMS "
|
||||||
message += "file system (%s)? [Y/n] " % remoteFile
|
message += "file system ('%s')? [Y/n] " % remoteFile
|
||||||
output = readInput(message, default="Y")
|
output = readInput(message, default="Y")
|
||||||
|
|
||||||
if forceCheck or (output and output.lower() == "y"):
|
if forceCheck or (output and output.lower() == "y"):
|
||||||
|
@ -276,14 +276,14 @@ class Filesystem:
|
||||||
|
|
||||||
if conf.direct or isStackingAvailable():
|
if conf.direct or isStackingAvailable():
|
||||||
if isStackingAvailable():
|
if isStackingAvailable():
|
||||||
debugMsg = "going to upload the %s file with " % fileType
|
debugMsg = "going to upload the file '%s' with " % fileType
|
||||||
debugMsg += "stacked query SQL injection technique"
|
debugMsg += "stacked query SQL injection technique"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
written = self.stackedWriteFile(localFile, remoteFile, fileType, forceCheck)
|
written = self.stackedWriteFile(localFile, remoteFile, fileType, forceCheck)
|
||||||
self.cleanup(onlyFileTbl=True)
|
self.cleanup(onlyFileTbl=True)
|
||||||
elif isTechniqueAvailable(PAYLOAD.TECHNIQUE.UNION) and Backend.isDbms(DBMS.MYSQL):
|
elif isTechniqueAvailable(PAYLOAD.TECHNIQUE.UNION) and Backend.isDbms(DBMS.MYSQL):
|
||||||
debugMsg = "going to upload the %s file with " % fileType
|
debugMsg = "going to upload the file '%s' with " % fileType
|
||||||
debugMsg += "UNION query SQL injection technique"
|
debugMsg += "UNION query SQL injection technique"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user