From 4d923ec3752a5fb79dbc2bedcf3b04c3d2edb82c Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 30 Jul 2011 21:46:59 +0000 Subject: [PATCH] change in invalid logic regarding --sql-shell (retrieving output for non-query commands did nothing at all) --- plugins/generic/enumeration.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index d21ac3379..e27ef9728 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -93,7 +93,6 @@ class Enumeration: kb.data.cachedCounts = {} kb.data.dumpedTable = {} kb.data.processChar = None - self.alwaysRetrieveSqlOutput = False def getBanner(self): if not conf.getBanner: @@ -2353,23 +2352,9 @@ class Enumeration: for sqlStatement in sqlStatements: if query.lower().startswith(sqlStatement): sqlType = sqlTitle - break - if not self.alwaysRetrieveSqlOutput: - message = "do you want to retrieve the SQL statement output? " - - if not sqlType or 'SELECT' in sqlType: - message += "[Y/n/a] " - getOutput = readInput(message, default="Y") - else: - message += "[y/N/a] " - getOutput = readInput(message, default="N") - - if getOutput in ("a", "A"): - self.alwaysRetrieveSqlOutput = True - - if not getOutput or getOutput in ("y", "Y") or self.alwaysRetrieveSqlOutput: + if not sqlType or 'SELECT' in sqlType: infoMsg = "fetching %s query output: '%s'" % (sqlType if sqlType is not None else "SQL", query) logger.info(infoMsg)