Minor bug fix for an Issue #361 (removal of that ugly garbage clean warning message after sqlmap ends)

This commit is contained in:
stamparm 2013-04-15 16:18:40 +02:00
parent 6ab2e8eca4
commit 1c2197e8de
3 changed files with 3 additions and 4 deletions

View File

@ -89,7 +89,7 @@ def setHandler():
except SqlmapConnectionException, msg:
logger.critical(msg)
if sqlalchemy.connection:
if sqlalchemy.connector:
conf.dbmsConnector = sqlalchemy
else:
conf.dbmsConnector.connect()

View File

@ -43,7 +43,7 @@ class SQLAlchemy(GenericConnector):
conf.direct = conf.direct.replace(conf.dbms, self.dialect)
engine = _sqlalchemy.create_engine(conf.direct, connect_args={'check_same_thread':False} if self.dialect == "sqlite" else {})
self.connection = engine.connect()
self.connector = engine.connect()
except SqlmapFilePathException:
raise
except Exception, msg:
@ -63,7 +63,7 @@ class SQLAlchemy(GenericConnector):
def execute(self, query):
try:
self.cursor = self.connection.execute(query)
self.cursor = self.connector.execute(query)
except (_sqlalchemy.exc.OperationalError, _sqlalchemy.exc.ProgrammingError), msg:
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg[1])
except _sqlalchemy.exc.InternalError, msg:

View File

@ -18,7 +18,6 @@ class Connector:
"""
def __init__(self):
self.connection = None
self.connector = None
self.cursor = None