mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-19 12:33:20 +03:00
Patch for an Issue #302
This commit is contained in:
parent
d4a061d0c3
commit
60baf5071e
|
@ -615,10 +615,13 @@ class Connect(object):
|
||||||
value = agent.replacePayload(value, payload)
|
value = agent.replacePayload(value, payload)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if place != PLACE.URI or (value and payload and '?' in value and value.find('?') < value.find(payload)):
|
if place != PLACE.URI or (value and payload and '?' in value and re.search(r"\?.*%s" % re.escape(payload), value)):
|
||||||
# GET, URI and Cookie need to be throughly URL encoded (POST is encoded down below)
|
# GET, URI and Cookie need to be throughly URL encoded (POST is encoded down below)
|
||||||
payload = urlencode(payload, '%', False, True) if place in (PLACE.GET, PLACE.COOKIE, PLACE.URI) and not skipUrlEncode else payload
|
payload = urlencode(payload, '%', False, True) if place in (PLACE.GET, PLACE.COOKIE, PLACE.URI) and not skipUrlEncode else payload
|
||||||
value = agent.replacePayload(value, payload)
|
value = agent.replacePayload(value, payload)
|
||||||
|
elif place == PLACE.URI and (value and payload and '?' in value and re.search(r"%s.*\?" % re.escape(payload), value)):
|
||||||
|
payload = urlencode(payload, '%')
|
||||||
|
value = agent.replacePayload(value, payload)
|
||||||
|
|
||||||
if conf.hpp:
|
if conf.hpp:
|
||||||
if not any(conf.url.lower().endswith(_.lower()) for _ in (WEB_API.ASP, WEB_API.ASPX)):
|
if not any(conf.url.lower().endswith(_.lower()) for _ in (WEB_API.ASP, WEB_API.ASPX)):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user