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

Skip to content

Commit 72cf061

Browse files
committed
Patch for an Issue #1852
1 parent 808068d commit 72cf061

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

lib/core/common.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,12 +1350,15 @@ def parseTargetUrl():
13501350
else:
13511351
conf.port = 80
13521352

1353-
if urlSplit.query:
1354-
conf.parameters[PLACE.GET] = urldecode(urlSplit.query) if urlSplit.query and urlencode(DEFAULT_GET_POST_DELIMITER, None) not in urlSplit.query else urlSplit.query
1355-
13561353
conf.url = getUnicode("%s://%s:%d%s" % (conf.scheme, ("[%s]" % conf.hostname) if conf.ipv6 else conf.hostname, conf.port, conf.path))
13571354
conf.url = conf.url.replace(URI_QUESTION_MARKER, '?')
13581355

1356+
if urlSplit.query:
1357+
if '=' not in urlSplit.query:
1358+
conf.url = "%s?%s" % (conf.url, getUnicode(urlSplit.query))
1359+
else:
1360+
conf.parameters[PLACE.GET] = urldecode(urlSplit.query) if urlSplit.query and urlencode(DEFAULT_GET_POST_DELIMITER, None) not in urlSplit.query else urlSplit.query
1361+
13591362
if not conf.referer and (intersect(REFERER_ALIASES, conf.testParameter, True) or conf.level >= 3):
13601363
debugMsg = "setting the HTTP Referer header to the target URL"
13611364
logger.debug(debugMsg)

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.17"
22+
VERSION = "1.0.5.18"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

0 commit comments

Comments
 (0)