mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 21:21:33 +00:00
update (now URIs like www.site.com/id82 are automatically treated as possible URI injectable)
This commit is contained in:
@@ -217,3 +217,6 @@ UNICODE_ENCODING = "utf8"
|
||||
|
||||
# Reference: http://www.w3.org/Protocols/HTTP/Object_Headers.html#uri
|
||||
URI_HTTP_HEADER = "URI"
|
||||
|
||||
# Uri format which could be injectable (e.g. www.site.com/id82)
|
||||
URI_INJECTABLE_REGEX = r".*/([^\.*?]+)\Z"
|
||||
|
||||
@@ -32,6 +32,7 @@ from lib.core.option import __setDBMS
|
||||
from lib.core.option import __setKnowledgeBaseAttributes
|
||||
from lib.core.session import resumeConfKb
|
||||
from lib.core.settings import UNICODE_ENCODING
|
||||
from lib.core.settings import URI_INJECTABLE_REGEX
|
||||
from lib.core.xmldump import dumper as xmldumper
|
||||
from lib.request.connect import Connect as Request
|
||||
|
||||
@@ -78,6 +79,9 @@ def __setRequestParams():
|
||||
|
||||
conf.method = HTTPMETHOD.POST
|
||||
|
||||
if re.search(URI_INJECTABLE_REGEX, conf.url, re.I):
|
||||
conf.url = "%s*" % conf.url
|
||||
|
||||
if "*" in conf.url:
|
||||
conf.parameters[PLACE.URI] = conf.url
|
||||
conf.paramDict[PLACE.URI] = {}
|
||||
|
||||
Reference in New Issue
Block a user