mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03:00
Avoid waiting 30 seconds when cleaning up the dbms and file system from sqlmap data
This commit is contained in:
parent
963fcb57b6
commit
a0df231aa4
|
@ -40,7 +40,7 @@ class Abstraction(Web, UDF, xp_cmdshell):
|
||||||
self.udfExecCmd(cmd, silent=silent)
|
self.udfExecCmd(cmd, silent=silent)
|
||||||
|
|
||||||
elif kb.dbms == "Microsoft SQL Server":
|
elif kb.dbms == "Microsoft SQL Server":
|
||||||
self.xpCmdshellExecCmd(cmd, silent)
|
self.xpCmdshellExecCmd(cmd, silent=silent)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
errMsg = "Feature not yet implemented for the back-end DBMS"
|
errMsg = "Feature not yet implemented for the back-end DBMS"
|
||||||
|
|
|
@ -84,10 +84,10 @@ class Miscellaneous:
|
||||||
else:
|
else:
|
||||||
cmd = "rm -f %s" % tempFile
|
cmd = "rm -f %s" % tempFile
|
||||||
|
|
||||||
self.execCmd(cmd)
|
self.execCmd(cmd, silent=True)
|
||||||
|
|
||||||
def createSupportTbl(self, tblName, tblField, tblType):
|
def createSupportTbl(self, tblName, tblField, tblType):
|
||||||
inject.goStacked("DROP TABLE %s" % tblName)
|
inject.goStacked("DROP TABLE %s" % tblName, silent=True)
|
||||||
inject.goStacked("CREATE TABLE %s(%s %s)" % (tblName, tblField, tblType))
|
inject.goStacked("CREATE TABLE %s(%s %s)" % (tblName, tblField, tblType))
|
||||||
|
|
||||||
def cleanup(self, onlyFileTbl=False, udfDict=None):
|
def cleanup(self, onlyFileTbl=False, udfDict=None):
|
||||||
|
@ -115,10 +115,10 @@ class Miscellaneous:
|
||||||
logger.info("cleaning up the database management system")
|
logger.info("cleaning up the database management system")
|
||||||
|
|
||||||
logger.debug("removing support tables")
|
logger.debug("removing support tables")
|
||||||
inject.goStacked("DROP TABLE %s" % self.fileTblName)
|
inject.goStacked("DROP TABLE %s" % self.fileTblName, silent=True)
|
||||||
|
|
||||||
if not onlyFileTbl:
|
if not onlyFileTbl:
|
||||||
inject.goStacked("DROP TABLE %s" % self.cmdTblName)
|
inject.goStacked("DROP TABLE %s" % self.cmdTblName, silent=True)
|
||||||
|
|
||||||
if kb.dbms == "Microsoft SQL Server":
|
if kb.dbms == "Microsoft SQL Server":
|
||||||
return
|
return
|
||||||
|
@ -138,7 +138,7 @@ class Miscellaneous:
|
||||||
dropStr += "(%s)" % inp
|
dropStr += "(%s)" % inp
|
||||||
|
|
||||||
logger.debug("removing UDF '%s'" % udf)
|
logger.debug("removing UDF '%s'" % udf)
|
||||||
inject.goStacked(dropStr)
|
inject.goStacked(dropStr, silent=True)
|
||||||
|
|
||||||
logger.info("database management system cleanup finished")
|
logger.info("database management system cleanup finished")
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,7 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry, Miscellaneous):
|
||||||
errMsg += "is unlikely to receive commands send from you"
|
errMsg += "is unlikely to receive commands send from you"
|
||||||
logger.error(errMsg)
|
logger.error(errMsg)
|
||||||
|
|
||||||
|
if kb.dbms in ( "MySQL", "PostgreSQL" ):
|
||||||
self.sysUdfs.pop("sys_bineval")
|
self.sysUdfs.pop("sys_bineval")
|
||||||
|
|
||||||
if kb.stackedTest or conf.direct:
|
if kb.stackedTest or conf.direct:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user