From c5087399c11d50181d4f2aa6dcd7b55889f138dc Mon Sep 17 00:00:00 2001 From: Meatballs Date: Sun, 16 Jun 2013 10:47:27 +0100 Subject: [PATCH] Fix exception if init technique not available --- 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 e0b76af6a..99fad25bd 100644 --- a/lib/takeover/xp_cmdshell.py +++ b/lib/takeover/xp_cmdshell.py @@ -209,9 +209,10 @@ class Xp_cmdshell: 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) - + if (output is None) or len(output)==0 or output[0] is None: output = [] count = inject.getValue("SELECT COUNT(id) FROM %s" % self.cmdTblName, resumeValue=False, union=False, error=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS)