@@ -183,8 +183,15 @@ def checkDbms(self):
183183 # reading information_schema on some platforms is causing annoying timeout exits
184184 # Reference: http://bugs.mysql.com/bug.php?id=15855
185185
186+ # Determine if it is MySQL >= 8.0.0
187+ if inject .checkBooleanExpression ("ISNULL(JSON_STORAGE_FREE(NULL))" ):
188+ kb .data .has_information_schema = True
189+ Backend .setVersion (">= 8.0.0" )
190+ setDbms ("%s 8" % DBMS .MYSQL )
191+ self .getBanner ()
192+
186193 # Determine if it is MySQL >= 5.0.0
187- if inject .checkBooleanExpression ("ISNULL(TIMESTAMPADD(MINUTE,[RANDNUM],NULL))" ):
194+ elif inject .checkBooleanExpression ("ISNULL(TIMESTAMPADD(MINUTE,[RANDNUM],NULL))" ):
188195 kb .data .has_information_schema = True
189196 Backend .setVersion (">= 5.0.0" )
190197 setDbms ("%s 5" % DBMS .MYSQL )
@@ -196,9 +203,17 @@ def checkDbms(self):
196203 infoMsg = "actively fingerprinting %s" % DBMS .MYSQL
197204 logger .info (infoMsg )
198205
199- # Check if it is MySQL >= 5.5.0
200- if inject .checkBooleanExpression ("TO_SECONDS(950501)>0" ):
201- Backend .setVersion (">= 5.5.0" )
206+ # Check if it is MySQL >= 5.7
207+ if inject .checkBooleanExpression ("ISNULL(JSON_QUOTE(NULL))" ):
208+ Backend .setVersion (">= 5.7" )
209+
210+ # Check if it is MySQL >= 5.6
211+ elif inject .checkBooleanExpression ("ISNULL(VALIDATE_PASSWORD_STRENGTH(NULL))" ):
212+ Backend .setVersion (">= 5.6" )
213+
214+ # Check if it is MySQL >= 5.5
215+ elif inject .checkBooleanExpression ("TO_SECONDS(950501)>0" ):
216+ Backend .setVersion (">= 5.5" )
202217
203218 # Check if it is MySQL >= 5.1.2 and < 5.5.0
204219 elif inject .checkBooleanExpression ("@@table_open_cache=@@table_open_cache" ):
0 commit comments