mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
making a "--exact" switch on demand (choosing exact identifier names by default instead of LIKE)
This commit is contained in:
parent
76a4aa19ac
commit
10b0639a96
|
@ -188,6 +188,7 @@ optDict = {
|
||||||
"checkPayload": "boolean",
|
"checkPayload": "boolean",
|
||||||
"cleanup": "boolean",
|
"cleanup": "boolean",
|
||||||
"dependencies": "boolean",
|
"dependencies": "boolean",
|
||||||
|
"exact": "boolean",
|
||||||
"googlePage": "integer",
|
"googlePage": "integer",
|
||||||
"mobile": "boolean",
|
"mobile": "boolean",
|
||||||
"pageRank": "boolean",
|
"pageRank": "boolean",
|
||||||
|
|
|
@ -596,6 +596,10 @@ def cmdLineParser():
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Check for missing sqlmap dependencies")
|
help="Check for missing sqlmap dependencies")
|
||||||
|
|
||||||
|
miscellaneous.add_option("--exact", dest="exact",
|
||||||
|
action="store_true",
|
||||||
|
help="Prefer usage of exact names for provided identificators")
|
||||||
|
|
||||||
miscellaneous.add_option("--gpage", dest="googlePage", type="int",
|
miscellaneous.add_option("--gpage", dest="googlePage", type="int",
|
||||||
help="Use Google dork results from specified page number")
|
help="Use Google dork results from specified page number")
|
||||||
|
|
||||||
|
|
|
@ -171,12 +171,12 @@ class Miscellaneous:
|
||||||
message += "[1] as LIKE %s names (default)\n" % what
|
message += "[1] as LIKE %s names (default)\n" % what
|
||||||
message += "[2] as exact %s names" % what
|
message += "[2] as exact %s names" % what
|
||||||
|
|
||||||
choice = readInput(message, default="1")
|
choice = readInput(message, default='1') if not conf.exact else '2'
|
||||||
|
|
||||||
if not choice or choice == "1":
|
if not choice or choice == '1':
|
||||||
choice = "1"
|
choice = '1'
|
||||||
condParam = " LIKE '%%%s%%'"
|
condParam = " LIKE '%%%s%%'"
|
||||||
elif choice == "2":
|
elif choice == '2':
|
||||||
condParam = "='%s'"
|
condParam = "='%s'"
|
||||||
else:
|
else:
|
||||||
errMsg = "invalid value"
|
errMsg = "invalid value"
|
||||||
|
|
|
@ -635,6 +635,10 @@ cleanup = False
|
||||||
# Valid: True or False
|
# Valid: True or False
|
||||||
dependencies = False
|
dependencies = False
|
||||||
|
|
||||||
|
# Prefer usage of exact names for provided identificators.
|
||||||
|
# Valid: True or False
|
||||||
|
exact = False
|
||||||
|
|
||||||
# Use Google dork results from specified page number.
|
# Use Google dork results from specified page number.
|
||||||
# Valid: integer
|
# Valid: integer
|
||||||
# Default: 1
|
# Default: 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user