mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Patch for -d (DREI)
This commit is contained in:
@@ -15,7 +15,7 @@ import os
|
||||
import re
|
||||
|
||||
from lib.core.common import getSafeExString
|
||||
from lib.core.convert import getBytes
|
||||
from lib.core.convert import getText
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import logger
|
||||
from lib.core.exception import SqlmapConnectionException
|
||||
@@ -34,9 +34,9 @@ class Connector(GenericConnector):
|
||||
def connect(self):
|
||||
self.initConnection()
|
||||
self.__dsn = cx_Oracle.makedsn(self.hostname, self.port, self.db)
|
||||
self.__dsn = getBytes(self.__dsn)
|
||||
self.user = getBytes(self.user)
|
||||
self.password = getBytes(self.password)
|
||||
self.__dsn = getText(self.__dsn)
|
||||
self.user = getText(self.user)
|
||||
self.password = getText(self.password)
|
||||
|
||||
try:
|
||||
self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password, mode=cx_Oracle.SYSDBA)
|
||||
@@ -67,7 +67,7 @@ class Connector(GenericConnector):
|
||||
retVal = False
|
||||
|
||||
try:
|
||||
self.cursor.execute(getBytes(query))
|
||||
self.cursor.execute(getText(query))
|
||||
retVal = True
|
||||
except cx_Oracle.DatabaseError as ex:
|
||||
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex))
|
||||
|
||||
Reference in New Issue
Block a user