ooni.nettests blocking Package

ooni.nettests.blocking.dnsconsistency Module

ooni.nettests.blocking.http_requests Module

class ooni.nettests.blocking.http_requests.HTTPRequestsTest[source]

Bases: ooni.templates.httpt.HTTPTest

Performs a two GET requests to the set of sites to be tested for censorship, one over a known good control channel (Tor), the other over the test network.

We check to see if the response headers match and if the response body lengths match.

author = 'Arturo Filast\xc3\xb2'
compare_body_lengths(body_length_a, body_length_b)[source]
compare_headers(headers_a, headers_b)[source]
control_body_length = None
description = 'Performs a HTTP GET request over Tor and one over the local network and compares the two results.'
experiment_body_length = None
inputFile = ['file', 'f', None, 'List of URLS to perform GET and POST requests to']
name = 'HTTP Requests'
postProcessor(measurements)[source]
requiresRoot = False
requiresTor = True
setUp()[source]

Check for inputs.

test_get_control()[source]
test_get_experiment()[source]
usageOptions

alias of UsageOptions

version = '0.2.4'
class ooni.nettests.blocking.http_requests.UsageOptions[source]

Bases: twisted.python.usage.Options

optParameters = [['url', 'u', None, 'Specify a single URL to test.'], ['factor', 'f', 0.8, 'What factor should be used for triggering censorship (0.8 == 80%)']]

ooni.nettests.blocking.tcpconnect Module

class ooni.nettests.blocking.tcp_connect.TCPConnectTest[source]

Bases: ooni.nettest.NetTestCase

author = 'Arturo Filast\xc3\xb2'
description = 'Performs a TCP connect scan of all the host port combinations given as input.'
inputFile = ['file', 'f', None, 'File containing the IP:PORT combinations to be tested, one per line']
inputProcessor(filename=None)[source]

This inputProcessor extracts name:port pairs from urls XXX: Does not support unusual port numbers

name = 'TCP Connect'
requiredOptions = ['file']
requiresRoot = False
requiresTor = False
test_connect()[source]

This test performs a TCP connection to the remote host on the specified port. The report will contains the string ‘success’ if the test has succeeded, or the reason for the failure if it has failed.

version = '0.1'
class ooni.nettests.blocking.tcp_connect.TCPFactory[source]

Bases: twisted.internet.protocol.Factory

buildProtocol(addr)[source]