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 from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # 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 = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} 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) 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 import logging
from lib.core.common import getSafeExString 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 conf
from lib.core.data import logger from lib.core.data import logger
from lib.core.exception import SqlmapConnectionException from lib.core.exception import SqlmapConnectionException
@ -58,7 +58,7 @@ class Connector(GenericConnector):
retVal = False retVal = False
try: try:
self.cursor.execute(getBytes(query)) self.cursor.execute(getText(query))
retVal = True retVal = True
except (pymssql.OperationalError, pymssql.ProgrammingError) as ex: except (pymssql.OperationalError, pymssql.ProgrammingError) as ex:
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex).replace("\n", " ")) 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 import re
from lib.core.common import getSafeExString 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 conf
from lib.core.data import logger from lib.core.data import logger
from lib.core.exception import SqlmapConnectionException from lib.core.exception import SqlmapConnectionException
@ -34,9 +34,9 @@ class Connector(GenericConnector):
def connect(self): def connect(self):
self.initConnection() self.initConnection()
self.__dsn = cx_Oracle.makedsn(self.hostname, self.port, self.db) self.__dsn = cx_Oracle.makedsn(self.hostname, self.port, self.db)
self.__dsn = getBytes(self.__dsn) self.__dsn = getText(self.__dsn)
self.user = getBytes(self.user) self.user = getText(self.user)
self.password = getBytes(self.password) self.password = getText(self.password)
try: try:
self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password, mode=cx_Oracle.SYSDBA) 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 retVal = False
try: try:
self.cursor.execute(getBytes(query)) self.cursor.execute(getText(query))
retVal = True retVal = True
except cx_Oracle.DatabaseError as ex: except cx_Oracle.DatabaseError as ex:
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex)) logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex))

View File

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

View File

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