From c7a606637f699c0f2e20def2eeaefa7c1223dc86 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 27 Apr 2012 12:59:22 +0000 Subject: [PATCH] switching few readInput defaults for brute forcing when no table/column found --- plugins/generic/enumeration.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index cdc317ed3..3471138fb 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -840,8 +840,8 @@ class Enumeration: return kb.data.cachedTables - message = "do you want to use common table existence check? [Y/n/q]" - test = readInput(message, default="Y") + message = "do you want to use common table existence check? %s" % ("[Y/n/q]" if Backend.getIdentifiedDbms() in (DBMS.ACCESS,) else "[y/N/q]") + test = readInput(message, default="Y" if "Y" in message else "N") if test[0] in ("n", "N"): return @@ -1060,8 +1060,8 @@ class Enumeration: return kb.data.cachedColumns - message = "do you want to use common columns existence check? [Y/n/q]" - test = readInput(message, default="Y") + message = "do you want to use common column existence check? %s" % ("[Y/n/q]" if Backend.getIdentifiedDbms() in (DBMS.ACCESS,) else "[y/N/q]") + test = readInput(message, default="Y" if "Y" in message else "N") if test[0] in ("n", "N"): return @@ -1979,8 +1979,8 @@ class Enumeration: bruteForce = True if bruteForce: - message = "do you want to use common table existence check? [Y/n/q]" - test = readInput(message, default="Y") + message = "do you want to use common table existence check? %s" % ("[Y/n/q]" if Backend.getIdentifiedDbms() in (DBMS.ACCESS,) else "[y/N/q]") + test = readInput(message, default="Y" if "Y" in message else "N") if test[0] in ("n", "N"): return @@ -2130,8 +2130,8 @@ class Enumeration: bruteForce = True if bruteForce: - message = "do you want to use common columns existence check? [Y/n/q]" - test = readInput(message, default="Y") + message = "do you want to use common column existence check? %s" % ("[Y/n/q]" if Backend.getIdentifiedDbms() in (DBMS.ACCESS,) else "[y/N/q]") + test = readInput(message, default="Y" if "Y" in message else "N") if test[0] in ("n", "N"): return