diff --git a/lib/core/option.py b/lib/core/option.py index 0448e118c..65fe12586 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -913,16 +913,8 @@ def __setHTTPMethod(): Check and set the HTTP method to perform HTTP requests through. """ - if conf.method: - conf.method = conf.method.upper() - - if conf.method not in (HTTPMETHOD.GET, HTTPMETHOD.POST): - warnMsg = "'%s' " % conf.method - warnMsg += "is an unsupported HTTP method, " - warnMsg += "setting to default method, %s" % HTTPMETHOD.GET - logger.warn(warnMsg) - - conf.method = HTTPMETHOD.GET + if conf.data: + conf.method = HTTPMETHOD.POST else: conf.method = HTTPMETHOD.GET diff --git a/lib/core/optiondict.py b/lib/core/optiondict.py index c52978865..e6d0dda52 100644 --- a/lib/core/optiondict.py +++ b/lib/core/optiondict.py @@ -22,7 +22,6 @@ optDict = { }, "Request": { - "method": "string", "data": "string", "cookie": "string", "cookieUrlencode": "boolean", diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 7fbad5794..bd9bca0b4 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -58,9 +58,6 @@ def cmdLineParser(): request = OptionGroup(parser, "Request", "These options can be used " "to specify how to connect to the target url.") - request.add_option("--method", dest="method", default="GET", - help="HTTP method, GET or POST (default GET)") - request.add_option("--data", dest="data", help="Data string to be sent through POST") diff --git a/sqlmap.conf b/sqlmap.conf index e5af4e6e5..a82ee5183 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -33,13 +33,7 @@ googleDork = # These options can be used to specify how to connect to the target url. [Request] -# HTTP method to perform HTTP requests. -# Valid: GET or POST -# Default: GET -method = GET - -# Data string to be sent through POST. It is mandatory only when -# HTTP method is set to POST. +# Data string to be sent through POST. data = # HTTP Cookie header.