Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be340fc

Browse files
committed
Patch for -d (DREI)
1 parent 6d07d52 commit be340fc

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.11.63"
21+
VERSION = "1.3.11.64"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

plugins/dbms/mssqlserver/connector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import logging
1515

1616
from lib.core.common import getSafeExString
17-
from lib.core.convert import getBytes
17+
from lib.core.convert import getText
1818
from lib.core.data import conf
1919
from lib.core.data import logger
2020
from lib.core.exception import SqlmapConnectionException
@@ -58,7 +58,7 @@ def execute(self, query):
5858
retVal = False
5959

6060
try:
61-
self.cursor.execute(getBytes(query))
61+
self.cursor.execute(getText(query))
6262
retVal = True
6363
except (pymssql.OperationalError, pymssql.ProgrammingError) as ex:
6464
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex).replace("\n", " "))

plugins/dbms/oracle/connector.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import re
1616

1717
from lib.core.common import getSafeExString
18-
from lib.core.convert import getBytes
18+
from lib.core.convert import getText
1919
from lib.core.data import conf
2020
from lib.core.data import logger
2121
from lib.core.exception import SqlmapConnectionException
@@ -34,9 +34,9 @@ class Connector(GenericConnector):
3434
def connect(self):
3535
self.initConnection()
3636
self.__dsn = cx_Oracle.makedsn(self.hostname, self.port, self.db)
37-
self.__dsn = getBytes(self.__dsn)
38-
self.user = getBytes(self.user)
39-
self.password = getBytes(self.password)
37+
self.__dsn = getText(self.__dsn)
38+
self.user = getText(self.user)
39+
self.password = getText(self.password)
4040

4141
try:
4242
self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password, mode=cx_Oracle.SYSDBA)
@@ -67,7 +67,7 @@ def execute(self, query):
6767
retVal = False
6868

6969
try:
70-
self.cursor.execute(getBytes(query))
70+
self.cursor.execute(getText(query))
7171
retVal = True
7272
except cx_Oracle.DatabaseError as ex:
7373
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex))

plugins/dbms/sqlite/connector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import logging
1414

1515
from lib.core.common import getSafeExString
16-
from lib.core.convert import getBytes
16+
from lib.core.convert import getText
1717
from lib.core.data import conf
1818
from lib.core.data import logger
1919
from lib.core.exception import SqlmapConnectionException
@@ -75,7 +75,7 @@ def fetchall(self):
7575

7676
def execute(self, query):
7777
try:
78-
self.cursor.execute(getBytes(query))
78+
self.cursor.execute(getText(query))
7979
except self.__sqlite.OperationalError as ex:
8080
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex))
8181
except self.__sqlite.DatabaseError as ex:

plugins/dbms/sybase/connector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import logging
1515

1616
from lib.core.common import getSafeExString
17-
from lib.core.convert import getBytes
17+
from lib.core.convert import getText
1818
from lib.core.data import conf
1919
from lib.core.data import logger
2020
from lib.core.exception import SqlmapConnectionException
@@ -58,7 +58,7 @@ def execute(self, query):
5858
retVal = False
5959

6060
try:
61-
self.cursor.execute(getBytes(query))
61+
self.cursor.execute(getText(query))
6262
retVal = True
6363
except (pymssql.OperationalError, pymssql.ProgrammingError) as ex:
6464
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) '%s'" % getSafeExString(ex).replace("\n", " "))

0 commit comments

Comments
 (0)