Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 831c960

Browse files
committed
Update for an Issue #1899
1 parent 43af2a4 commit 831c960

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.5.70"
22+
VERSION = "1.0.5.71"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

lib/request/connect.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,9 +863,13 @@ def queryPage(value=None, place=None, content=False, getRatioValue=False, silent
863863
if conf.csrfToken:
864864
def _adjustParameter(paramString, parameter, newValue):
865865
retVal = paramString
866-
match = re.search("%s=(?P<value>[^&]*)" % re.escape(parameter), paramString)
866+
match = re.search("%s=[^&]*" % re.escape(parameter), paramString)
867867
if match:
868-
retVal = re.sub("%s=[^&]*" % re.escape(parameter), "%s=%s" % (parameter, newValue), paramString)
868+
retVal = re.sub(match.group(0), "%s=%s" % (parameter, newValue), paramString)
869+
else:
870+
match = re.search("(%s[\"']:[\"'])([^\"']+)" % re.escape(parameter), paramString)
871+
if match:
872+
retVal = re.sub(match.group(0), "%s%s" % (match.group(1), newValue), paramString)
869873
return retVal
870874

871875
page, headers, code = Connect.getPage(url=conf.csrfUrl or conf.url, data=conf.data if conf.csrfUrl == conf.url else None, method=conf.method if conf.csrfUrl == conf.url else None, cookie=conf.parameters.get(PLACE.COOKIE), direct=True, silent=True, ua=conf.parameters.get(PLACE.USER_AGENT), referer=conf.parameters.get(PLACE.REFERER), host=conf.parameters.get(PLACE.HOST))

0 commit comments

Comments
 (0)