From 5902a4c3c2a2373bf2005c0652dcea61ade68a3f Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Wed, 17 Dec 2014 16:28:39 +0100 Subject: [PATCH] Use HTTPS for speedtest.net URLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HTTP is insecure – any attacker with a privileged network position could intercept the request and possibly drop/rewrite it. HTTPS makes it much harder and much more expensive for anyone to do so. Some more reasons, taken from : * SSL’s not perfect, but we need to make surveillance as expensive as possible. * For privacy not to be suspicious, privacy should be on by default. --- speedtest_cli.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/speedtest_cli.py b/speedtest_cli.py index 10e0889..ce9f8dc 100755 --- a/speedtest_cli.py +++ b/speedtest_cli.py @@ -319,7 +319,7 @@ def getConfig(): we are interested in """ - request = build_request('http://www.speedtest.net/speedtest-config.php') + request = build_request('https://www.speedtest.net/speedtest-config.php') uh = urlopen(request) configxml = [] while 1: @@ -357,7 +357,7 @@ def closestServers(client, all=False): distance """ - url = 'http://www.speedtest.net/speedtest-servers-static.php' + url = 'https://www.speedtest.net/speedtest-servers-static.php' request = build_request(url) uh = urlopen(request) serversxml = [] @@ -684,8 +684,8 @@ def speedtest(): (ping, ulspeedk, dlspeedk, '297aae72')) .encode()).hexdigest()] - headers = {'Referer': 'http://c.speedtest.net/flash/speedtest.swf'} - request = build_request('http://www.speedtest.net/api/api.php', + headers = {'Referer': 'https://c.speedtest.net/flash/speedtest.swf'} + request = build_request('https://www.speedtest.net/api/api.php', data='&'.join(apiData).encode(), headers=headers) f = urlopen(request) @@ -703,7 +703,7 @@ def speedtest(): print_('Could not submit results to speedtest.net') sys.exit(1) - print_('Share results: http://www.speedtest.net/result/%s.png' % + print_('Share results: https://www.speedtest.net/result/%s.png' % resultid[0])