mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-26 00:33:14 +03:00
Refactoring (standardized with --search -C ...)
This commit is contained in:
parent
d160888784
commit
9126c84442
|
@ -1038,19 +1038,14 @@ class Enumeration:
|
||||||
infoMsg = "fetching columns "
|
infoMsg = "fetching columns "
|
||||||
|
|
||||||
if len(colList) > 0:
|
if len(colList) > 0:
|
||||||
message = "do you want to use LIKE operator to "
|
colConsider, colCondParam = self.likeOrExact("column")
|
||||||
message += "retrieve column names similar to the "
|
condQueryStr = "%%s%s" % colCondParam
|
||||||
message += "ones provided with the -C option? [Y/n]"
|
condQuery = " AND (%s)" % " OR ".join(condQueryStr % (condition, unsafeSQLIdentificatorNaming(col)) for col in colList)
|
||||||
|
|
||||||
test = readInput(message, default="Y")
|
if colConsider == "1":
|
||||||
|
|
||||||
if not (isinstance(test, basestring) and test.upper() == "N"):
|
|
||||||
condQuery = " AND (%s)" % " OR ".join("%s LIKE '%%%s%%'" % (condition, unsafeSQLIdentificatorNaming(col)) for col in colList)
|
|
||||||
infoMsg += "LIKE '%s' " % ", ".join(unsafeSQLIdentificatorNaming(col) for col in colList)
|
infoMsg += "LIKE '%s' " % ", ".join(unsafeSQLIdentificatorNaming(col) for col in colList)
|
||||||
else:
|
else:
|
||||||
condQuery = " AND (%s)" % " OR ".join("%s = '%s'" % (condition, unsafeSQLIdentificatorNaming(col)) for col in colList)
|
|
||||||
infoMsg += "'%s' " % ", ".join(unsafeSQLIdentificatorNaming(col) for col in colList)
|
infoMsg += "'%s' " % ", ".join(unsafeSQLIdentificatorNaming(col) for col in colList)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
condQuery = ""
|
condQuery = ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user