mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-29 09:23:30 +03:00
Minor speedup in -f mysql
This commit is contained in:
parent
b02bd55edc
commit
7c87ad4065
|
@ -190,7 +190,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Check if it is MySQL >= 5.5.0
|
# Check if it is MySQL >= 5.5.0
|
||||||
if inject.checkBooleanExpression("6=(SELECT MID(TO_SECONDS(950501), 1, 1))"):
|
if inject.checkBooleanExpression("TO_SECONDS(950501)>0"):
|
||||||
kb.dbmsVersion = [">= 5.5.0"]
|
kb.dbmsVersion = [">= 5.5.0"]
|
||||||
|
|
||||||
# Check if it is MySQL >= 5.1.2 and < 5.5.0
|
# Check if it is MySQL >= 5.1.2 and < 5.5.0
|
||||||
|
@ -228,11 +228,9 @@ class Fingerprint(GenericFingerprint):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Check which version of MySQL < 5.0.0 it is
|
# Check which version of MySQL < 5.0.0 it is
|
||||||
coercibility = inject.getValue("SELECT COERCIBILITY(USER())", suppressOutput=True)
|
if inject.checkBooleanExpression("3=(SELECT COERCIBILITY(USER()))"):
|
||||||
|
|
||||||
if coercibility == "3":
|
|
||||||
kb.dbmsVersion = [">= 4.1.11", "< 5.0.0"]
|
kb.dbmsVersion = [">= 4.1.11", "< 5.0.0"]
|
||||||
elif coercibility == "2":
|
elif inject.checkBooleanExpression("2=(SELECT COERCIBILITY(USER()))"):
|
||||||
kb.dbmsVersion = [">= 4.1.1", "< 4.1.11"]
|
kb.dbmsVersion = [">= 4.1.1", "< 4.1.11"]
|
||||||
elif inject.getValue("SELECT CURRENT_USER()", suppressOutput=True):
|
elif inject.getValue("SELECT CURRENT_USER()", suppressOutput=True):
|
||||||
kb.dbmsVersion = [">= 4.0.6", "< 4.1.1"]
|
kb.dbmsVersion = [">= 4.0.6", "< 4.1.1"]
|
||||||
|
@ -264,7 +262,7 @@ class Fingerprint(GenericFingerprint):
|
||||||
infoMsg = "fingerprinting the back-end DBMS operating system"
|
infoMsg = "fingerprinting the back-end DBMS operating system"
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
if inject.checkBooleanExpression("'/'=(SELECT MID(@@datadir, 1, 1))"):
|
if inject.checkBooleanExpression("(SELECT MID(@@datadir, 1, 1))='/'"):
|
||||||
kb.os = "Linux"
|
kb.os = "Linux"
|
||||||
else:
|
else:
|
||||||
kb.os = "Windows"
|
kb.os = "Windows"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user