Skip to content

Commit a72096a

Browse files
committed
slightly more appropriate definition of output variable
1 parent cae108d commit a72096a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎lib/takeover/xp_cmdshell.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ def xpCmdshellExecCmd(self, cmd, silent=False):
183183
return inject.goStacked(self.xpCmdshellForgeCmd(cmd), silent)
184184

185185
def xpCmdshellEvalCmd(self, cmd, first=None, last=None):
186+
output = None
187+
186188
if conf.direct:
187189
output = self.xpCmdshellExecCmd(cmd)
188190

@@ -208,7 +210,6 @@ def xpCmdshellEvalCmd(self, cmd, first=None, last=None):
208210
self.delRemoteFile(self.tmpFile)
209211

210212
query = "SELECT %s FROM %s ORDER BY id" % (self.tblField, self.cmdTblName)
211-
output = None
212213

213214
if any(isTechniqueAvailable(_) for _ in (PAYLOAD.TECHNIQUE.UNION, PAYLOAD.TECHNIQUE.ERROR, PAYLOAD.TECHNIQUE.QUERY)) or conf.direct:
214215
output = inject.getValue(query, resumeValue=False, blind=False, time=False)

0 commit comments

Comments
 (0)