mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Expanding capabilities of MySQL to correctly retrieve UTF8MB4 chars
This commit is contained in:
parent
69108bcf01
commit
ec58f57fa9
6 changed files with 18 additions and 3 deletions
|
|
@ -95,6 +95,14 @@ class Fingerprint(GenericFingerprint):
|
|||
|
||||
return None
|
||||
|
||||
def _checkUtf8mb4(self):
|
||||
# NCHAR (utf8mb3) downgrades 4-byte chars (emoji) to '?'; cache whether utf8mb4 works ('' if not)
|
||||
kb.mysqlUtf8mb4 = hashDBRetrieve(HASHDB_KEYS.MYSQL_UTF8MB4)
|
||||
|
||||
if kb.mysqlUtf8mb4 is None:
|
||||
kb.mysqlUtf8mb4 = "utf8mb4" if inject.checkBooleanExpression("[RANDNUM]=CONVERT([RANDNUM] USING utf8mb4)") else ""
|
||||
hashDBWrite(HASHDB_KEYS.MYSQL_UTF8MB4, kb.mysqlUtf8mb4)
|
||||
|
||||
def getFingerprint(self):
|
||||
fork = hashDBRetrieve(HASHDB_KEYS.DBMS_FORK)
|
||||
|
||||
|
|
@ -118,6 +126,8 @@ class Fingerprint(GenericFingerprint):
|
|||
|
||||
hashDBWrite(HASHDB_KEYS.DBMS_FORK, fork)
|
||||
|
||||
self._checkUtf8mb4()
|
||||
|
||||
value = ""
|
||||
wsOsFp = Format.getOs("web server", kb.headersFp)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue