mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
IFNULL-like mechanism now works on SQLite 2 too
This commit is contained in:
parent
75bf8528d1
commit
832d95984c
|
@ -331,10 +331,11 @@ class Agent(object):
|
|||
rootQuery = queries[Backend.getIdentifiedDbms()]
|
||||
|
||||
if field.startswith("(CASE") or field.startswith("(IIF") or\
|
||||
conf.noCast or Backend.isDbms(DBMS.SQLITE) and not isDBMSVersionAtLeast('3'):
|
||||
conf.noCast:
|
||||
nulledCastedField = field
|
||||
else:
|
||||
nulledCastedField = rootQuery.cast.query % field
|
||||
if not (Backend.isDbms(DBMS.SQLITE) and not isDBMSVersionAtLeast('3')):
|
||||
nulledCastedField = rootQuery.cast.query % field
|
||||
if Backend.getIdentifiedDbms() in (DBMS.ACCESS,):
|
||||
nulledCastedField = rootQuery.isnull.query % (nulledCastedField, nulledCastedField)
|
||||
else:
|
||||
|
|
|
@ -296,7 +296,7 @@
|
|||
<cast query="CAST(%s AS VARCHAR(8000))" dbms_version=">=3.0"/>
|
||||
<!-- NOTE: On SQLite version 2 everything is stored as a string (Reference: http://www.mono-project.com/SQLite) -->
|
||||
<length query="LENGTH(%s)"/>
|
||||
<isnull query="IFNULL(%s,' ')" dbms_version=">=3.0"/>
|
||||
<isnull query="COALESCE(%s,' ')"/>
|
||||
<delimiter query="||"/>
|
||||
<limit query="LIMIT %d,%d"/>
|
||||
<limitregexp query="\s+LIMIT\s+([\d]+)\s*\,\s*([\d]+)" query2="\s+LIMIT\s+([\d]+)"/>
|
||||
|
|
Loading…
Reference in New Issue
Block a user