mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-10 16:40:36 +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:
|
except SqlmapConnectionException, msg:
|
||||||
logger.critical(msg)
|
logger.critical(msg)
|
||||||
|
|
||||||
if sqlalchemy.connection:
|
if sqlalchemy.connector:
|
||||||
conf.dbmsConnector = sqlalchemy
|
conf.dbmsConnector = sqlalchemy
|
||||||
else:
|
else:
|
||||||
conf.dbmsConnector.connect()
|
conf.dbmsConnector.connect()
|
||||||
|
|
|
@ -43,7 +43,7 @@ class SQLAlchemy(GenericConnector):
|
||||||
conf.direct = conf.direct.replace(conf.dbms, self.dialect)
|
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 {})
|
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:
|
except SqlmapFilePathException:
|
||||||
raise
|
raise
|
||||||
except Exception, msg:
|
except Exception, msg:
|
||||||
|
@ -63,7 +63,7 @@ class SQLAlchemy(GenericConnector):
|
||||||
|
|
||||||
def execute(self, query):
|
def execute(self, query):
|
||||||
try:
|
try:
|
||||||
self.cursor = self.connection.execute(query)
|
self.cursor = self.connector.execute(query)
|
||||||
except (_sqlalchemy.exc.OperationalError, _sqlalchemy.exc.ProgrammingError), msg:
|
except (_sqlalchemy.exc.OperationalError, _sqlalchemy.exc.ProgrammingError), msg:
|
||||||
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg[1])
|
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg[1])
|
||||||
except _sqlalchemy.exc.InternalError, msg:
|
except _sqlalchemy.exc.InternalError, msg:
|
||||||
|
|
|
@ -18,7 +18,6 @@ class Connector:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.connection = None
|
|
||||||
self.connector = None
|
self.connector = None
|
||||||
self.cursor = None
|
self.cursor = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user