mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-28 20:43:49 +03:00
avoid tracebacks because the parameter does not exist
This commit is contained in:
parent
c9c520a325
commit
d42d28392a
|
@ -65,7 +65,7 @@ class Registry:
|
||||||
logger.debug("creating batch file '%s'" % self._batPathRemote)
|
logger.debug("creating batch file '%s'" % self._batPathRemote)
|
||||||
|
|
||||||
self._createLocalBatchFile()
|
self._createLocalBatchFile()
|
||||||
self.writeFile(self._batPathLocal, self._batPathRemote, "text")
|
self.writeFile(self._batPathLocal, self._batPathRemote, "text", forceCheck=True)
|
||||||
|
|
||||||
os.unlink(self._batPathLocal)
|
os.unlink(self._batPathLocal)
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,6 @@ class Filesystem(GenericFilesystem):
|
||||||
errMsg = "on Microsoft Access it is not possible to read files"
|
errMsg = "on Microsoft Access it is not possible to read files"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
||||||
def writeFile(self, wFile, dFile, fileType=None):
|
def writeFile(self, wFile, dFile, fileType=None, forceCheck=False):
|
||||||
errMsg = "on Microsoft Access it is not possible to write files"
|
errMsg = "on Microsoft Access it is not possible to write files"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
|
@ -16,6 +16,6 @@ class Filesystem(GenericFilesystem):
|
||||||
errMsg = "on Firebird it is not possible to read files"
|
errMsg = "on Firebird it is not possible to read files"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
||||||
def writeFile(self, wFile, dFile, fileType=None):
|
def writeFile(self, wFile, dFile, fileType=None, forceCheck=False):
|
||||||
errMsg = "on Firebird it is not possible to write files"
|
errMsg = "on Firebird it is not possible to write files"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
|
@ -16,6 +16,6 @@ class Filesystem(GenericFilesystem):
|
||||||
errMsg = "on SAP MaxDB reading of files is not supported"
|
errMsg = "on SAP MaxDB reading of files is not supported"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
||||||
def writeFile(self, wFile, dFile, fileType=None):
|
def writeFile(self, wFile, dFile, fileType=None, forceCheck=False):
|
||||||
errMsg = "on SAP MaxDB writing of files is not supported"
|
errMsg = "on SAP MaxDB writing of files is not supported"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
|
@ -158,7 +158,7 @@ class Filesystem(GenericFilesystem):
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def unionWriteFile(self, wFile, dFile, fileType):
|
def unionWriteFile(self, wFile, dFile, fileType, forceCheck=False):
|
||||||
errMsg = "Microsoft SQL Server does not support file upload with "
|
errMsg = "Microsoft SQL Server does not support file upload with "
|
||||||
errMsg += "UNION query SQL injection technique"
|
errMsg += "UNION query SQL injection technique"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
@ -340,8 +340,7 @@ class Filesystem(GenericFilesystem):
|
||||||
wFileContent = f.read()
|
wFileContent = f.read()
|
||||||
|
|
||||||
self._stackedWriteFileVbs(tmpPath, wFileContent, dFile, fileType)
|
self._stackedWriteFileVbs(tmpPath, wFileContent, dFile, fileType)
|
||||||
|
written = self.askCheckWrittenFile(wFile, dFile, forceCheck)
|
||||||
written = self.askCheckWrittenFile(wFile, dFile)
|
|
||||||
|
|
||||||
if written is False:
|
if written is False:
|
||||||
message = "do you want to try to upload the file with "
|
message = "do you want to try to upload the file with "
|
||||||
|
|
|
@ -17,7 +17,7 @@ class Filesystem(GenericFilesystem):
|
||||||
errMsg += "Oracle"
|
errMsg += "Oracle"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
||||||
def writeFile(self, wFile, dFile, fileType=None):
|
def writeFile(self, wFile, dFile, fileType=None, forceCheck=False):
|
||||||
errMsg = "File system write access not yet implemented for "
|
errMsg = "File system write access not yet implemented for "
|
||||||
errMsg += "Oracle"
|
errMsg += "Oracle"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
|
@ -28,7 +28,7 @@ class Filesystem(GenericFilesystem):
|
||||||
|
|
||||||
return self.udfEvalCmd(cmd=rFile, udfName="sys_fileread")
|
return self.udfEvalCmd(cmd=rFile, udfName="sys_fileread")
|
||||||
|
|
||||||
def unionWriteFile(self, wFile, dFile, fileType):
|
def unionWriteFile(self, wFile, dFile, fileType, forceCheck=False):
|
||||||
errMsg = "PostgreSQL does not support file upload with UNION "
|
errMsg = "PostgreSQL does not support file upload with UNION "
|
||||||
errMsg += "query SQL injection technique"
|
errMsg += "query SQL injection technique"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
|
@ -16,6 +16,6 @@ class Filesystem(GenericFilesystem):
|
||||||
errMsg = "on SQLite it is not possible to read files"
|
errMsg = "on SQLite it is not possible to read files"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
||||||
def writeFile(self, wFile, dFile, fileType=None):
|
def writeFile(self, wFile, dFile, fileType=None, forceCheck=False):
|
||||||
errMsg = "on SQLite it is not possible to write files"
|
errMsg = "on SQLite it is not possible to write files"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
|
@ -16,6 +16,6 @@ class Filesystem(GenericFilesystem):
|
||||||
errMsg = "on Sybase it is not possible to read files"
|
errMsg = "on Sybase it is not possible to read files"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
||||||
def writeFile(self, wFile, dFile, fileType=None):
|
def writeFile(self, wFile, dFile, fileType=None, forceCheck=False):
|
||||||
errMsg = "on Sybase it is not possible to write files"
|
errMsg = "on Sybase it is not possible to write files"
|
||||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||||
|
|
|
@ -171,12 +171,12 @@ class Filesystem:
|
||||||
errMsg += "into the specific DBMS plugin"
|
errMsg += "into the specific DBMS plugin"
|
||||||
raise SqlmapUndefinedMethod(errMsg)
|
raise SqlmapUndefinedMethod(errMsg)
|
||||||
|
|
||||||
def unionWriteFile(self, localFile, remoteFile, fileType):
|
def unionWriteFile(self, localFile, remoteFile, fileType, forceCheck=False):
|
||||||
errMsg = "'unionWriteFile' method must be defined "
|
errMsg = "'unionWriteFile' method must be defined "
|
||||||
errMsg += "into the specific DBMS plugin"
|
errMsg += "into the specific DBMS plugin"
|
||||||
raise SqlmapUndefinedMethod(errMsg)
|
raise SqlmapUndefinedMethod(errMsg)
|
||||||
|
|
||||||
def stackedWriteFile(self, localFile, remoteFile, fileType):
|
def stackedWriteFile(self, localFile, remoteFile, fileType, forceCheck=False):
|
||||||
errMsg = "'stackedWriteFile' method must be defined "
|
errMsg = "'stackedWriteFile' method must be defined "
|
||||||
errMsg += "into the specific DBMS plugin"
|
errMsg += "into the specific DBMS plugin"
|
||||||
raise SqlmapUndefinedMethod(errMsg)
|
raise SqlmapUndefinedMethod(errMsg)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user