mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
Couple of important patches
This commit is contained in:
@@ -3617,16 +3617,20 @@ def decodeIntToUnicode(value):
|
||||
try:
|
||||
if value > 255:
|
||||
_ = "%x" % value
|
||||
|
||||
if len(_) % 2 == 1:
|
||||
_ = "0%s" % _
|
||||
|
||||
raw = decodeHex(_)
|
||||
|
||||
if Backend.isDbms(DBMS.MYSQL):
|
||||
# Reference: https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_ord
|
||||
# Note: https://github.com/sqlmapproject/sqlmap/issues/1531
|
||||
retVal = getUnicode(raw, conf.encoding or UNICODE_ENCODING)
|
||||
elif Backend.isDbms(DBMS.MSSQL):
|
||||
retVal = getUnicode(raw, "UTF-16-BE") # References: https://docs.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support?view=sql-server-2017 and https://stackoverflow.com/a/14488478
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.PGSQL, DBMS.ORACLE):
|
||||
# Reference: https://docs.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support?view=sql-server-2017 and https://stackoverflow.com/a/14488478
|
||||
retVal = getUnicode(raw, "UTF-16-BE")
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.PGSQL, DBMS.ORACLE, DBMS.SQLITE): # Note: cases with Unicode code points (e.g. http://www.postgresqltutorial.com/postgresql-ascii/)
|
||||
retVal = _unichr(value)
|
||||
else:
|
||||
retVal = getUnicode(raw, conf.encoding)
|
||||
|
||||
Reference in New Issue
Block a user