mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-11 03:03:45 +03:00
fix for localhost firebird direct db access
This commit is contained in:
parent
36953221f8
commit
ac55e1b75f
|
@ -675,7 +675,7 @@ def parseTargetDirect():
|
||||||
for dbmsName, data in dbmsDict.items():
|
for dbmsName, data in dbmsDict.items():
|
||||||
if conf.dbms in data[0]:
|
if conf.dbms in data[0]:
|
||||||
try:
|
try:
|
||||||
if dbmsName in ('Access', 'SQLite'):
|
if dbmsName in ('Access', 'SQLite', 'Firebird'):
|
||||||
if remote:
|
if remote:
|
||||||
warnMsg = "direct connection over the network for "
|
warnMsg = "direct connection over the network for "
|
||||||
warnMsg += "%s DBMS is not supported" % dbmsName
|
warnMsg += "%s DBMS is not supported" % dbmsName
|
||||||
|
|
|
@ -44,6 +44,9 @@ class Connector(GenericConnector):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
GenericConnector.__init__(self)
|
GenericConnector.__init__(self)
|
||||||
|
|
||||||
|
# sample usage:
|
||||||
|
# ./sqlmap.py -d "firebird://sysdba:testpass@/opt/firebird/testdb.fdb"
|
||||||
|
# ./sqlmap.py -d "firebird://sysdba:testpass@127.0.0.1:3050//opt/firebird/testdb.fdb"
|
||||||
def connect(self):
|
def connect(self):
|
||||||
self.initConnection()
|
self.initConnection()
|
||||||
|
|
||||||
|
@ -51,7 +54,7 @@ class Connector(GenericConnector):
|
||||||
self.checkFileDb()
|
self.checkFileDb()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.connector = kinterbasdb.connect(host=self.hostname, database=self.db, user=self.user, password=self.password)
|
self.connector = kinterbasdb.connect(host=str(self.hostname), database=str(self.db), user=str(self.user), password=str(self.password)) #, charset="UTF8")
|
||||||
except kinterbasdb.OperationalError, msg:
|
except kinterbasdb.OperationalError, msg:
|
||||||
raise sqlmapConnectionException, msg[1]
|
raise sqlmapConnectionException, msg[1]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user