mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
some refactoring
This commit is contained in:
parent
212035e64d
commit
428e817a32
3 changed files with 12 additions and 7 deletions
|
|
@ -1919,8 +1919,8 @@ def getInjectionTests():
|
|||
detected DBMS from error messages
|
||||
"""
|
||||
retVal = conf.tests
|
||||
if kb.htmlFp:
|
||||
dbms = kb.htmlFp[-1]
|
||||
if getErrorParsedDBMS():
|
||||
dbms = getErrorParsedDBMS()
|
||||
retVal = sorted(retVal, key=lambda test: False\
|
||||
if 'details' in test and 'dbms' in test.details\
|
||||
and test.details.dbms == dbms else True)
|
||||
|
|
@ -1953,3 +1953,6 @@ def unicodeToSafeHTMLValue(value):
|
|||
if ord(char) > 127:
|
||||
retVal = retVal.replace(char, "&#%d;" % ord(char))
|
||||
return retVal
|
||||
|
||||
def getErrorParsedDBMS():
|
||||
return kb.htmlFp[0] if kb.htmlFp else None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue