From 06f226c4943301dc96e30eb18d1c6f1414648c26 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 23 Oct 2012 14:37:45 +0200 Subject: [PATCH] Fix for an Issue #211 --- lib/core/target.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/core/target.py b/lib/core/target.py index f8f98d375..ed1eba31b 100644 --- a/lib/core/target.py +++ b/lib/core/target.py @@ -24,6 +24,7 @@ from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger from lib.core.data import paths +from lib.core.dicts import DBMS_DICT from lib.core.dump import dumper from lib.core.enums import HASHDB_KEYS from lib.core.enums import HTTPHEADER @@ -301,8 +302,14 @@ def __resumeDBMS(): dbmsVersion = [_.group(2)] if conf.dbms: - if conf.dbms.lower() != dbms: - message = "you provided '%s' as back-end DBMS, " % conf.dbms + check = True + for aliases, _, _ in DBMS_DICT.values(): + if conf.dbms.lower() in aliases and dbms not in aliases: + check = False + break + + if not check: + message = "you provided '%s' as a back-end DBMS, " % conf.dbms message += "but from a past scan information on the target URL " message += "sqlmap assumes the back-end DBMS is %s. " % dbms message += "Do you really want to force the back-end "