Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b83167

Browse files
committed
Major bug fix in takeover functionalities on Microsoft SQL Server
1 parent c6cae7d commit 7b83167

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

doc/ChangeLog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ sqlmap (0.8-1) stable; urgency=low
4242
* Added simple file encryption/compression utility, extra/cloak/cloak.py
4343
used by sqlmap to decrypt on the fly Churrasco executable and web
4444
shells consequently reduced drastically the number of anti virus
45-
softwares that mistakenly mark sqlmap as a malware (Miroslav)
45+
softwares that mistakenly mark sqlmap as a malware (Miroslav).
4646

4747
-- Bernardo Damele A. G. <[email protected]> Mon, 1 Mar 2010 10:00:00 +0000
4848

lib/takeover/xp_cmdshell.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def __xpCmdshellConfigure(self, mode):
103103
self.xpCmdshellExecCmd(cmd)
104104

105105
def __xpCmdshellCheck(self):
106-
query = self.xpCmdshellForgeCmd("ping -n %d 127.0.0.1" % (conf.timeSec + 2))
106+
query = self.xpCmdshellForgeCmd("ping -n %d 127.0.0.1" % (conf.timeSec * 2))
107107
duration = timeUse(query)
108108

109109
if duration >= conf.timeSec:
@@ -112,14 +112,15 @@ def __xpCmdshellCheck(self):
112112
return False
113113

114114
def xpCmdshellForgeCmd(self, cmd):
115-
return "EXEC %s '%s'" % (self.xpCmdshellStr, cmd)
115+
forgedCmd = "EXEC %s '%s'" % (self.xpCmdshellStr, cmd)
116+
forgedCmd = urlencode(forgedCmd, convall=True)
117+
118+
return forgedCmd
116119

117120
def xpCmdshellExecCmd(self, cmd, silent=False, forgeCmd=False):
118121
if forgeCmd:
119122
cmd = self.xpCmdshellForgeCmd(cmd)
120123

121-
cmd = urlencode(cmd, convall=True)
122-
123124
inject.goStacked(cmd, silent)
124125

125126
def xpCmdshellEvalCmd(self, cmd, first=None, last=None):

0 commit comments

Comments
 (0)