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

Skip to content

Commit 9e0d890

Browse files
committed
Fixed MySQL 5.1 extensive fingerprint
1 parent c1010c2 commit 9e0d890

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

plugins/dbms/mysql.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -285,23 +285,15 @@ def checkDbms(self):
285285
kb.dbmsVersion = [">= 6.0.3", "< 6.0.5"]
286286

287287
# Or if it MySQL >= 5.1.2 and < 6.0.3
288-
elif inject.getValue("MID(@@plugin_dir, 1, 1)"):
289-
if inject.getValue("SELECT %s FROM information_schema.PROFILING LIMIT 0, 1" % randInt) == randInt:
290-
kb.dbmsVersion = [">= 5.1.28", "< 6.0.3"]
291-
elif inject.getValue("MID(@@innodb_stats_on_metadata, 1, 1)"):
292-
kb.dbmsVersion = [">= 5.1.17", "< 5.1.28"]
293-
elif inject.getValue("SELECT %s FROM information_schema.REFERENTIAL_CONSTRAINTS LIMIT 0, 1" % randInt) == randInt:
294-
kb.dbmsVersion = [">= 5.1.10", "< 5.1.17"]
295-
elif inject.getValue("SELECT %s FROM information_schema.PROCESSLIST LIMIT 0, 1" % randInt) == randInt:
296-
kb.dbmsVersion = [">= 5.1.7", "< 5.1.10"]
288+
elif inject.getValue("MID(@@table_open_cache, 1, 1)"):
289+
if inject.getValue("SELECT %s FROM information_schema.PROCESSLIST LIMIT 0, 1" % randInt) == randInt:
290+
kb.dbmsVersion = [">= 5.1.7", "< 6.0.3"]
297291
elif inject.getValue("SELECT %s FROM information_schema.PARTITIONS LIMIT 0, 1" % randInt) == randInt:
298292
kb.dbmsVersion = ["= 5.1.6"]
299293
elif inject.getValue("SELECT %s FROM information_schema.PLUGINS LIMIT 0, 1" % randInt) == randInt:
300294
kb.dbmsVersion = [">= 5.1.5", "< 5.1.6"]
301-
elif inject.getValue("MID(@@table_open_cache, 1, 1)"):
302-
kb.dbmsVersion = [">= 5.1.3", "< 5.1.5"]
303295
else:
304-
kb.dbmsVersion = ["= 5.1.2"]
296+
kb.dbmsVersion = [">= 5.1.2", "< 5.1.5"]
305297

306298
# Or if it is MySQL >= 5.0.0 and < 5.1.2
307299
elif inject.getValue("MID(@@hostname, 1, 1)"):

0 commit comments

Comments
 (0)