Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Captiveportal #3

Closed
wants to merge 8 commits into from
2 changes: 2 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ effort: low, skill: medium
* All the captive portal detection tests (old/ooni/http.py
and old/ooni/dnsooni.py)
effort: low, skill: low
- The captiveportal test is a port of the old code, plus
a couple new methods for testing.

* All the DNS censorship detection tests (old/ooni/dnsooni.py)
effort: medium, skill: medium
Expand Down
4 changes: 4 additions & 0 deletions assets/captive_portal_tests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

http://ooni.nu, Open Observatory of Network Interference, 200
https://w2.eff.org/Censorship/Internet_censorship_bills/barlow_0296.declaration, let us now take our leave of them, 200
https://www.torproject.org, Defend yourself against network surveillance and traffic analysis, 200
23 changes: 23 additions & 0 deletions ooni-probe.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,29 @@ dns_control_server = 91.191.136.152
# on positive results.
dns_reverse_lookup = true

### captiveportal testing configuration parameters

# This is an optional list of user defined captive portal tests,
# one per line, with each line in the format:
# experiment_url, control_result, control_code
# where experiment_url is the test page to retrieve,
# control_result is some unique text found on the test page,
# and control_code is the expected HTTP status code.
captive_portal = captive_portal_tests.txt

# The default User Agent that ooni-probe should send for
# HTTP requests (pretend we're a Windows box running FF10):
default_ua = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2

# Enable vendor tests for captive portals:
do_captive_portal_vendor_tests = true

# Enable DNS-based vendor tests for captive portals:
do_captive_portal_vendor_dns_tests = true

# Enable checking of DNS requests for tampering:
check_dns_requests = true

### traceroute testing related config parameters

# This is the list of ips to traceroute to
Expand Down
4 changes: 4 additions & 0 deletions ooniprobe.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ def __init__(self):
self.tests = Storage()
#self.load_tests()

self.tally = Storage()
self.tally.count = 0
self.tally.marks = Storage()

self.runtests = self.config.tests.run.split(",")


Expand Down
1 change: 1 addition & 0 deletions plugoo/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Test:
def __init__(self, ooni, name="test"):
self.config = ooni.config
self.logger = ooni.logger
self.tally = ooni.tally
self.name = name
self.report = Report(ooni,
scp=ooni.config.report.ssh,
Expand Down
Loading