Patch for -d (DREI)

This commit is contained in:
Miroslav Stampar 2019-11-17 00:22:47 +01:00
parent 6d07d52ccd
commit be340fcf11
5 changed files with 12 additions and 12 deletions

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.11.63"
VERSION = "1.3.11.64"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -14,7 +14,7 @@ except:
import logging
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
@ -58,7 +58,7 @@ class Connector(GenericConnector):
retVal = False
try:
self.cursor.execute(getBytes(query))
self.cursor.execute(getText(query))
retVal = True
except (pymssql.OperationalError, pymssql.ProgrammingError) as ex:
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex).replace("\n", " "))

View File

@ -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))

View File

@ -13,7 +13,7 @@ except:
import logging
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
@ -75,7 +75,7 @@ class Connector(GenericConnector):
def execute(self, query):
try:
self.cursor.execute(getBytes(query))
self.cursor.execute(getText(query))
except self.__sqlite.OperationalError as ex:
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex))
except self.__sqlite.DatabaseError as ex:

View File

@ -14,7 +14,7 @@ except:
import logging
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
@ -58,7 +58,7 @@ class Connector(GenericConnector):
retVal = False
try:
self.cursor.execute(getBytes(query))
self.cursor.execute(getText(query))
retVal = True
except (pymssql.OperationalError, pymssql.ProgrammingError) as ex:
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex).replace("\n", " "))