mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-02 20:54:13 +03:00
Minor bug fix for an Issue #361 (removal of that ugly garbage clean warning message after sqlmap ends)
This commit is contained in:
parent
6ab2e8eca4
commit
1c2197e8de
|
@ -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()
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -18,7 +18,6 @@ class Connector:
|
|||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.connection = None
|
||||
self.connector = None
|
||||
self.cursor = None
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user