diff --git a/lib/controller/handler.py b/lib/controller/handler.py index aecb1438b..31e2859d1 100644 --- a/lib/controller/handler.py +++ b/lib/controller/handler.py @@ -10,6 +10,7 @@ from lib.core.data import conf from lib.core.data import logger from lib.core.dicts import DBMS_DICT from lib.core.enums import DBMS +from lib.core.exception import SqlmapConnectionException from lib.core.settings import MSSQL_ALIASES from lib.core.settings import MYSQL_ALIASES from lib.core.settings import ORACLE_ALIASES @@ -82,7 +83,11 @@ def setHandler(): dialect = DBMS_DICT[name][3] sqlalchemy = SQLAlchemy(dialect=dialect) - sqlalchemy.connect() + + try: + sqlalchemy.connect() + except SqlmapConnectionException, msg: + logger.critical(msg) if sqlalchemy.connection: conf.dbmsConnector = sqlalchemy