Added option --search to work in conjunction with -D (done), -T (soon) or -C (replaces --dump -C) - See #190:

* --search -D foobar: searches all database names like the ones provided
* --search -T foobar: searches all databases' table names like the ones provided (soon)
* --search -C foobar: replaces --dump -C
This commit is contained in:
Bernardo Damele
2010-05-07 13:40:57 +00:00
parent 7b6050f3c1
commit 65a05452f7
13 changed files with 516 additions and 338 deletions

View File

@@ -184,3 +184,21 @@ class Miscellaneous:
warnMsg += "saved on the file system can only be deleted "
warnMsg += "manually"
logger.warn(warnMsg)
def likeOrExact(self, what):
message = "do you want sqlmap to consider provided %s(s):\n" % what
message += "[1] as LIKE column names (default)\n"
message += "[2] as exact column names"
choice = readInput(message, default="1")
if not choice or choice == "1":
choice = "1"
condParam = " LIKE '%%%s%%'"
elif choice.isdigit() and choice == "2":
condParam = "='%s'"
else:
errMsg = "invalid value"
raise sqlmapNoneDataException, errMsg
return choice, condParam