From a72096a34550403c17c8a9c0944079e208f39edb Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Wed, 19 Jun 2013 20:25:01 +0100 Subject: [PATCH] slightly more appropriate definition of output variable --- lib/takeover/xp_cmdshell.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/takeover/xp_cmdshell.py b/lib/takeover/xp_cmdshell.py index c92f0f244..0b8a16b95 100644 --- a/lib/takeover/xp_cmdshell.py +++ b/lib/takeover/xp_cmdshell.py @@ -183,6 +183,8 @@ class Xp_cmdshell: return inject.goStacked(self.xpCmdshellForgeCmd(cmd), silent) def xpCmdshellEvalCmd(self, cmd, first=None, last=None): + output = None + if conf.direct: output = self.xpCmdshellExecCmd(cmd) @@ -208,7 +210,6 @@ class Xp_cmdshell: self.delRemoteFile(self.tmpFile) query = "SELECT %s FROM %s ORDER BY id" % (self.tblField, self.cmdTblName) - output = None if any(isTechniqueAvailable(_) for _ in (PAYLOAD.TECHNIQUE.UNION, PAYLOAD.TECHNIQUE.ERROR, PAYLOAD.TECHNIQUE.QUERY)) or conf.direct: output = inject.getValue(query, resumeValue=False, blind=False, time=False)