mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
If SQLAlchemy is available and it has problems while connecting then it should be smarter to not force the other (standard) method - if available
This commit is contained in:
parent
de99717b00
commit
840ee26a14
|
@ -83,11 +83,7 @@ def setHandler():
|
|||
|
||||
dialect = DBMS_DICT[name][3]
|
||||
sqlalchemy = SQLAlchemy(dialect=dialect)
|
||||
|
||||
try:
|
||||
sqlalchemy.connect()
|
||||
except SqlmapConnectionException, msg:
|
||||
logger.critical(msg)
|
||||
sqlalchemy.connect()
|
||||
|
||||
if sqlalchemy.connector:
|
||||
conf.dbmsConnector = sqlalchemy
|
||||
|
|
|
@ -36,7 +36,7 @@ class SQLAlchemy(GenericConnector):
|
|||
try:
|
||||
if not self.port and self.db:
|
||||
if not os.path.exists(self.db):
|
||||
raise SqlmapFilePathException, "missing database file '%s'" % self.db
|
||||
raise SqlmapFilePathException, "the provided database file '%s' does not exist" % self.db
|
||||
|
||||
_ = conf.direct.split("//", 1)
|
||||
conf.direct = "%s////%s" % (_[0], os.path.abspath(self.db))
|
||||
|
|
Loading…
Reference in New Issue
Block a user