mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
fix for localhost firebird direct db access
This commit is contained in:
parent
36953221f8
commit
ac55e1b75f
|
@ -647,7 +647,7 @@ def parseTargetDirect():
|
|||
if details.group('remote'):
|
||||
remote = True
|
||||
conf.hostname = details.group('hostname')
|
||||
conf.port = int(details.group('port'))
|
||||
conf.port = int(details.group('port'))
|
||||
else:
|
||||
conf.hostname = "localhost"
|
||||
conf.port = 0
|
||||
|
@ -675,7 +675,7 @@ def parseTargetDirect():
|
|||
for dbmsName, data in dbmsDict.items():
|
||||
if conf.dbms in data[0]:
|
||||
try:
|
||||
if dbmsName in ('Access', 'SQLite'):
|
||||
if dbmsName in ('Access', 'SQLite', 'Firebird'):
|
||||
if remote:
|
||||
warnMsg = "direct connection over the network for "
|
||||
warnMsg += "%s DBMS is not supported" % dbmsName
|
||||
|
|
|
@ -44,6 +44,9 @@ class Connector(GenericConnector):
|
|||
def __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):
|
||||
self.initConnection()
|
||||
|
||||
|
@ -51,7 +54,7 @@ class Connector(GenericConnector):
|
|||
self.checkFileDb()
|
||||
|
||||
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:
|
||||
raise sqlmapConnectionException, msg[1]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user