mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-07-25 23:49:49 +03:00
put the consent cookie in the headers
This commit is contained in:
parent
be5634b031
commit
5c1549b891
|
@ -134,6 +134,9 @@ BING_REGEX = r'<h2><a href="([^"]+)" h='
|
|||
# Dummy user agent for search (if default one returns different results)
|
||||
DUMMY_SEARCH_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0"
|
||||
|
||||
#to update on terms update
|
||||
SEARCH_COOKIE = "CONSENT=YES+shp.gws-20210419-0-RC1.nl+FX+740"
|
||||
|
||||
# Regular expression used for extracting content from "textual" tags
|
||||
TEXT_TAG_REGEX = r"(?si)<(abbr|acronym|b|blockquote|br|center|cite|code|dt|em|font|h\d|i|li|p|pre|q|strong|sub|sup|td|th|title|tt|u)(?!\w).*?>(?P<result>[^<]+)"
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ from lib.core.exception import SqlmapUserQuitException
|
|||
from lib.core.settings import BING_REGEX
|
||||
from lib.core.settings import DUCKDUCKGO_REGEX
|
||||
from lib.core.settings import DEFAULT_USER_AGENT
|
||||
from lib.core.settings import SEARCH_COOKIE
|
||||
from lib.core.settings import GOOGLE_REGEX
|
||||
from lib.core.settings import HTTP_ACCEPT_ENCODING_HEADER_VALUE
|
||||
from lib.core.settings import UNICODE_ENCODING
|
||||
|
@ -52,7 +53,7 @@ def _search(dork):
|
|||
|
||||
requestHeaders[HTTP_HEADER.USER_AGENT] = DEFAULT_USER_AGENT
|
||||
requestHeaders[HTTP_HEADER.ACCEPT_ENCODING] = HTTP_ACCEPT_ENCODING_HEADER_VALUE
|
||||
|
||||
requestHeaders[HTTP_HEADER.COOKIE] = SEARCH_COOKIE
|
||||
try:
|
||||
req = _urllib.request.Request("https://www.google.com/ncr", headers=requestHeaders)
|
||||
conn = _urllib.request.urlopen(req)
|
||||
|
|
Loading…
Reference in New Issue
Block a user