Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8013a64

Browse files
committed
minor refactoring
1 parent c71d435 commit 8013a64

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plugins/generic/enumeration.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,8 +1608,9 @@ def dumpTable(self, foundData=None):
16081608
else:
16091609
query = rootQuery.inband.query % (colString, conf.db, tbl)
16101610
elif Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL):
1611-
_ = 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)
1612-
query = rootQuery.inband.query % (colString, conf.db, tbl, _[0])
1611+
_ = lambda x: x and "id" in x.lower()
1612+
orderby = sorted(sorted(colList, key=len), lambda x, y: -1 if _(x) and not _(y) else 1 if not _(x) and _(y) else 0)[0]
1613+
query = rootQuery.inband.query % (colString, conf.db, tbl, orderby)
16131614
else:
16141615
query = rootQuery.inband.query % (colString, conf.db, tbl)
16151616

0 commit comments

Comments
 (0)