mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-25 17:09:02 +00:00
Avoid to check for existence of not needed UDFs and minor code adjustment for cleanup() method
This commit is contained in:
@@ -560,6 +560,7 @@ class MySQLMap(Fingerprint, Enumeration, Filesystem, Miscellaneous, Takeover):
|
||||
self.udfLocalFile += "/mysql/linux/lib_mysqludf_sys.so"
|
||||
self.udfSharedLibExt = "so"
|
||||
|
||||
self.checkNeededUdfs()
|
||||
self.udfInjectCore(self.sysUdfs)
|
||||
|
||||
def uncPathRequest(self):
|
||||
|
||||
@@ -469,6 +469,7 @@ class PostgreSQLMap(Fingerprint, Enumeration, Filesystem, Miscellaneous, Takeove
|
||||
self.udfLocalFile += "/postgresql/linux/%s/lib_postgresqludf_sys.so" % majorVer
|
||||
self.udfSharedLibExt = "so"
|
||||
|
||||
self.checkNeededUdfs()
|
||||
self.udfInjectCore(self.sysUdfs)
|
||||
|
||||
def uncPathRequest(self):
|
||||
|
||||
@@ -100,6 +100,9 @@ class Takeover(Abstraction, Metasploit, Registry):
|
||||
if not web or (web and self.webBackdoorUrl is not None):
|
||||
self.runCmd(conf.osCmd)
|
||||
|
||||
if not conf.osShell and not conf.osPwn and not conf.cleanup:
|
||||
self.cleanup()
|
||||
|
||||
def osShell(self):
|
||||
stackedTest()
|
||||
|
||||
@@ -120,6 +123,9 @@ class Takeover(Abstraction, Metasploit, Registry):
|
||||
if not web or (web and self.webBackdoorUrl is not None):
|
||||
self.shell()
|
||||
|
||||
if not conf.osPwn and not conf.cleanup:
|
||||
self.cleanup()
|
||||
|
||||
def osPwn(self):
|
||||
goUdf = False
|
||||
|
||||
@@ -228,6 +234,9 @@ class Takeover(Abstraction, Metasploit, Registry):
|
||||
if not web or (web and self.webBackdoorUrl is not None):
|
||||
self.pwn(goUdf)
|
||||
|
||||
if not conf.cleanup:
|
||||
self.cleanup()
|
||||
|
||||
def osSmb(self):
|
||||
stackedTest()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user