mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 13:03:50 +03:00
making "id"-like columns prioritized for ORDER BY in MySQL
This commit is contained in:
parent
17efeaae7f
commit
c71d435d9f
|
@ -1608,7 +1608,8 @@ class Enumeration:
|
||||||
else:
|
else:
|
||||||
query = rootQuery.inband.query % (colString, conf.db, tbl)
|
query = rootQuery.inband.query % (colString, conf.db, tbl)
|
||||||
elif Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL):
|
elif Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL):
|
||||||
query = rootQuery.inband.query % (colString, conf.db, tbl, sorted(colList, key=len)[0])
|
_ = sorted(sorted(colList, key=len), lambda x, y: -1 if x and "id" in x.lower() else 1 if y and "id" in y.lower() else 0)
|
||||||
|
query = rootQuery.inband.query % (colString, conf.db, tbl, _[0])
|
||||||
else:
|
else:
|
||||||
query = rootQuery.inband.query % (colString, conf.db, tbl)
|
query = rootQuery.inband.query % (colString, conf.db, tbl)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user