mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-09 08:00:36 +03:00
if the user forces the DBMS, then sort the tests accordingly to perform first the DBMS-specific tests, then the others
This commit is contained in:
parent
d235ee375b
commit
383929c0c2
|
@ -438,10 +438,9 @@ class Backend:
|
||||||
|
|
||||||
This functions is called to:
|
This functions is called to:
|
||||||
|
|
||||||
1. Sort the tests, getSortedInjectionTests() - detection phase.
|
1. Ask user whether or not skip specific DBMS tests in detection phase,
|
||||||
2. Ask user whether or not skip specific DBMS tests in detection phase,
|
|
||||||
lib/controller/checks.py - detection phase.
|
lib/controller/checks.py - detection phase.
|
||||||
3. Sort the fingerprint of the DBMS, lib/controller/handler.py -
|
2. Sort the fingerprint of the DBMS, lib/controller/handler.py -
|
||||||
fingerprint phase.
|
fingerprint phase.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -449,6 +448,13 @@ class Backend:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def getIdentifiedDbms():
|
def getIdentifiedDbms():
|
||||||
|
"""
|
||||||
|
This functions is called to:
|
||||||
|
|
||||||
|
1. Sort the tests, getSortedInjectionTests() - detection phase.
|
||||||
|
2. Etc.
|
||||||
|
"""
|
||||||
|
|
||||||
dbms = None
|
dbms = None
|
||||||
|
|
||||||
if not kb:
|
if not kb:
|
||||||
|
@ -2823,14 +2829,14 @@ def getSortedInjectionTests():
|
||||||
retVal = SORT_ORDER.LAST
|
retVal = SORT_ORDER.LAST
|
||||||
|
|
||||||
elif 'details' in test and 'dbms' in test.details:
|
elif 'details' in test and 'dbms' in test.details:
|
||||||
if intersect(test.details.dbms, Backend.getErrorParsedDBMSes()):
|
if intersect(test.details.dbms, Backend.getIdentifiedDbms()):
|
||||||
retVal = SORT_ORDER.SECOND
|
retVal = SORT_ORDER.SECOND
|
||||||
else:
|
else:
|
||||||
retVal = SORT_ORDER.THIRD
|
retVal = SORT_ORDER.THIRD
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
if Backend.getErrorParsedDBMSes():
|
if Backend.getIdentifiedDbms():
|
||||||
retVal = sorted(retVal, key=priorityFunction)
|
retVal = sorted(retVal, key=priorityFunction)
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
Loading…
Reference in New Issue
Block a user