mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-20 06:28:55 +00:00
Fix WebSocket request header formatting
This commit is contained in:
parent
fadf5bb753
commit
bfe39d010f
3 changed files with 4 additions and 4 deletions
|
|
@ -520,7 +520,7 @@ class Connect(object):
|
|||
if webSocket:
|
||||
ws = websocket.WebSocket()
|
||||
ws.settimeout(WEBSOCKET_INITIAL_TIMEOUT if kb.webSocketRecvCount is None else timeout)
|
||||
wsHeaders = tuple("%s: %s" % _ for _ in headers.items() if _[0] not in ("Host",))
|
||||
wsHeaders = tuple("%s: %s" % (getUnicode(key), getUnicode(value)) for key, value in headers.items() if getUnicode(key).upper() != HTTP_HEADER.HOST.upper())
|
||||
ws.connect(url, header=wsHeaders, cookie=cookie) # WebSocket will add Host field of headers automatically
|
||||
ws.send(urldecode(post or ""))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue