mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
Avoid to check for existence of not needed UDFs and minor code adjustment for cleanup() method
This commit is contained in:
@@ -46,18 +46,6 @@ class Abstraction(Web, UDF, xp_cmdshell):
|
||||
Web.__init__(self)
|
||||
xp_cmdshell.__init__(self)
|
||||
|
||||
def __cmdShellCleanup(self):
|
||||
if not conf.cleanup:
|
||||
if kb.dbms in ( "MySQL", "PostgreSQL" ):
|
||||
self.cleanup()
|
||||
|
||||
elif kb.dbms == "Microsoft SQL Server":
|
||||
self.cleanup(onlyFileTbl=True)
|
||||
|
||||
else:
|
||||
errMsg = "Feature not yet implemented for the back-end DBMS"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
def execCmd(self, cmd, silent=False, forgeCmd=False):
|
||||
if self.webBackdoorUrl and not kb.stackedTest:
|
||||
self.webBackdoorRunCmd(cmd)
|
||||
@@ -103,9 +91,6 @@ class Abstraction(Web, UDF, xp_cmdshell):
|
||||
else:
|
||||
self.execCmd(cmd, forgeCmd=True)
|
||||
|
||||
if not conf.osShell and not conf.osPwn and not conf.cleanup:
|
||||
self.__cmdShellCleanup()
|
||||
|
||||
def shell(self):
|
||||
if self.webBackdoorUrl and not kb.stackedTest:
|
||||
infoMsg = "calling OS shell. To quit type "
|
||||
@@ -157,8 +142,6 @@ class Abstraction(Web, UDF, xp_cmdshell):
|
||||
|
||||
self.runCmd(command)
|
||||
|
||||
self.__cmdShellCleanup()
|
||||
|
||||
def initEnv(self, mandatory=True, detailed=False, web=False):
|
||||
if self.envInitialized:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user