mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Minor update
This commit is contained in:
parent
b11fd8b9f7
commit
d834e8debf
|
@ -35,6 +35,7 @@ from lib.core.common import findPageForms
|
|||
from lib.core.common import getConsoleWidth
|
||||
from lib.core.common import getFileItems
|
||||
from lib.core.common import getFileType
|
||||
from lib.core.common import getUnicode
|
||||
from lib.core.common import isListLike
|
||||
from lib.core.common import normalizePath
|
||||
from lib.core.common import ntToPosixSlashes
|
||||
|
@ -293,7 +294,7 @@ def __feedTargetsDict(reqFile, addedTargetUrls):
|
|||
|
||||
# Avoid proxy and connection type related headers
|
||||
elif key not in ( HTTPHEADER.PROXY_CONNECTION, HTTPHEADER.CONNECTION ):
|
||||
conf.httpHeaders.append((str(key), str(value)))
|
||||
conf.httpHeaders.append((getUnicode(key), getUnicode(value)))
|
||||
|
||||
if getPostReq and (params or cookie):
|
||||
if not port and isinstance(scheme, basestring) and scheme.lower() == "https":
|
||||
|
|
|
@ -55,8 +55,8 @@ def forgeHeaders(items=None):
|
|||
message += "The target url provided its own cookies within "
|
||||
message += "the HTTP %s header which intersect with yours. " % HTTPHEADER.SET_COOKIE
|
||||
message += "Do you want to merge them in futher requests? [Y/n] "
|
||||
test = readInput(message, default="Y")
|
||||
kb.mergeCookies = not test or test[0] in ("y", "Y")
|
||||
_ = readInput(message, default="Y")
|
||||
kb.mergeCookies = not _ or _[0] in ("y", "Y")
|
||||
|
||||
if kb.mergeCookies:
|
||||
_ = lambda x: re.sub("(?i)%s=[^%s]+" % (cookie.name, DEFAULT_COOKIE_DELIMITER), "%s=%s" % (cookie.name, cookie.value), x)
|
||||
|
@ -64,6 +64,7 @@ def forgeHeaders(items=None):
|
|||
|
||||
if PLACE.COOKIE in conf.parameters:
|
||||
conf.parameters[PLACE.COOKIE] = _(conf.parameters[PLACE.COOKIE])
|
||||
|
||||
conf.httpHeaders = [(item[0], item[1] if item[0] != HTTPHEADER.COOKIE else _(item[1])) for item in conf.httpHeaders]
|
||||
|
||||
elif not kb.testMode:
|
||||
|
|
Loading…
Reference in New Issue
Block a user