Skip to content

Commit 1bf6a7c

Browse files
committed
Adapted sqlmap to latest changes in Metasploit trunk
1 parent aa14bea commit 1bf6a7c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

plugins/generic/takeover.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,13 @@ def osPwn(self):
305305
self.initEnv()
306306
self.getRemoteTempPath()
307307

308-
goUdf = False
309-
condition = ( kb.dbms == "MySQL" or kb.dbms == "PostgreSQL" )
308+
goUdf = False
310309

311-
if condition is True:
310+
if kb.dbms == "MySQL":
312311
msg = "how do you want to execute the Metasploit shellcode "
313312
msg += "on the back-end database underlying operating system?"
314-
msg += "\n[1] Stand-alone payload stager (file system way, default)"
315-
msg += "\n[2] Via UDF 'sys_bineval' (in-memory way, anti-forensics)"
313+
msg += "\n[1] Via UDF 'sys_bineval' (in-memory way, anti-forensics, default)"
314+
msg += "\n[2] Stand-alone payload stager (file system way)"
316315

317316
while True:
318317
choice = readInput(msg, default=1)
@@ -328,9 +327,12 @@ def osPwn(self):
328327
warnMsg = "invalid value, valid values are 1 and 2"
329328
logger.warn(warnMsg)
330329

331-
if choice == 2:
330+
if choice == 1:
332331
goUdf = True
333332

333+
elif kb.dbms == "PostgreSQL":
334+
goUdf = True
335+
334336
if goUdf is True:
335337
self.createMsfShellcode(exitfunc="thread", format="raw", extra="BufferRegister=EAX", encode="x86/alpha_mixed")
336338
else:

0 commit comments

Comments
 (0)