mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
This commit is contained in:
parent
8ee9feafb9
commit
233b9a3815
|
@ -8,6 +8,7 @@ See the file 'doc/COPYING' for copying permission
|
||||||
import httplib
|
import httplib
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
|
import string
|
||||||
import time
|
import time
|
||||||
import urllib2
|
import urllib2
|
||||||
import urlparse
|
import urlparse
|
||||||
|
@ -276,7 +277,6 @@ class Connect:
|
||||||
|
|
||||||
headers[HTTPHEADER.ACCEPT] = HTTP_ACCEPT_HEADER_VALUE
|
headers[HTTPHEADER.ACCEPT] = HTTP_ACCEPT_HEADER_VALUE
|
||||||
headers[HTTPHEADER.ACCEPT_ENCODING] = HTTP_ACCEPT_ENCODING_HEADER_VALUE
|
headers[HTTPHEADER.ACCEPT_ENCODING] = HTTP_ACCEPT_ENCODING_HEADER_VALUE
|
||||||
|
|
||||||
headers[HTTPHEADER.HOST] = host or getHostHeader(url)
|
headers[HTTPHEADER.HOST] = host or getHostHeader(url)
|
||||||
|
|
||||||
if auxHeaders:
|
if auxHeaders:
|
||||||
|
@ -302,6 +302,13 @@ class Connect:
|
||||||
cookies = conf.cj._cookies_for_request(req)
|
cookies = conf.cj._cookies_for_request(req)
|
||||||
requestHeaders += "\n%s" % ("Cookie: %s" % ";".join("%s=%s" % (getUnicode(cookie.name), getUnicode(cookie.value)) for cookie in cookies))
|
requestHeaders += "\n%s" % ("Cookie: %s" % ";".join("%s=%s" % (getUnicode(cookie.name), getUnicode(cookie.value)) for cookie in cookies))
|
||||||
|
|
||||||
|
if post:
|
||||||
|
if not req.has_header(HTTPHEADER.CONTENT_TYPE):
|
||||||
|
requestHeaders += "\n%s: %s" % (string.capwords(HTTPHEADER.CONTENT_TYPE), "application/x-www-form-urlencoded")
|
||||||
|
|
||||||
|
if not req.has_header(HTTPHEADER.CONTENT_LENGTH):
|
||||||
|
requestHeaders += "\n%s: %d" % (string.capwords(HTTPHEADER.CONTENT_LENGTH), len(post))
|
||||||
|
|
||||||
if not req.has_header(HTTPHEADER.CONNECTION):
|
if not req.has_header(HTTPHEADER.CONNECTION):
|
||||||
requestHeaders += "\n%s: close" % HTTPHEADER.CONNECTION
|
requestHeaders += "\n%s: close" % HTTPHEADER.CONNECTION
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user