Unverified Commit 98c40891 authored by Philipp Winter's avatar Philipp Winter
Browse files

Make user agent resemble the latest Tor Browser.

parent a893598a
......@@ -189,13 +189,12 @@ def new_request(url, data=None):
# Note that the order of header fields is also relevant but urllib2 uses a
# dictionary for headers, which is orderless.
request.add_header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; rv:52.0) "
"Gecko/20100101 Firefox/52.0")
request.add_header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; rv:60.0) "
"Gecko/20100101 Firefox/60.0")
request.add_header("Accept", "text/html,application/xhtml+xml,"
request.add_header("Accept-Language", "en-US,en;q=0.5")
request.add_header("Accept-Encoding", "gzip, deflate")
request.add_header("Connection", "keep-alive")
request.add_header("Accept-Encoding", "gzip, deflate, br")
request.add_header("Upgrade-Insecure-Requests", "1")
return request
......@@ -79,7 +79,6 @@ class TestUtil(unittest.TestCase):
def test_parse_log_lines(self):
ports = {"socks": -1, "control": -1}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment