This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Running of the script against the following files (OONI reports): | |
# 87M 2015-12-22.json | |
# 97M 2015-12-22.yaml | |
# | |
# vanilla json: 1.37932395935 | |
# ultra json: 0.421966075897 | |
# simple json: 1.23581790924 | |
# yaml: 193.864903927 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Interesting DNS Consistency tests | |
SELECT input, report_id FROM reports WHERE test_name='dns_consistency' AND (test_keys->>'tampering_detected')::bool=true; | |
# Interesting HTTP requests tests | |
SELECT input, report_id FROM reports WHERE test_name='http_requests' AND (test_keys->>'body_length_match')::bool=false; | |
# Interesting tests that indicate a generic failure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import traceback | |
from datetime import datetime | |
from multiprocessing import Process, Semaphore, JoinableQueue | |
class BaseNode(object): | |
def __init__(self, concurrency=1): | |
self.concurrency = concurrency |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# To get GeoIPASNum.dat: | |
# wget https://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz && gunzip GeoIPASNum.dat.gz | |
import sys | |
import pygeoip | |
if len(sys.argv) < 2: | |
print "Usage: path/to/GeoIPASNum.dat [IPs ... ...]" | |
ips = sys.argv[2:] | |
gi = pygeoip.GeoIP(sys.argv[1]) | |
for ip in ips: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from cryptography.hazmat.primitives import serialization | |
from cryptography.hazmat.backends import default_backend | |
from cryptography.hazmat.primitives.asymmetric import rsa | |
from cryptography.hazmat.backends.openssl.backend import Backend | |
from config import priv_key_path | |
def generate_private_key(private_key_path): | |
private_key = rsa.generate_private_key( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Goal | asn | sbs | cda | irl | average | phw | feamster | phillipa | mer | ||
---|---|---|---|---|---|---|---|---|---|---|---|
Implement data analytics and visualization for OONI tests | 5 | 4 | 5 | 5 | 4.75 | "+1" | "+1" | "+1" | |||
Reach production quality ooni rasperry-pi (beagle-board) images | 4 | 4 | 4 | 5 | 4.25 | "+1" | |||||
Develop OONI tests for censorship circumvention tools | 4 | 4 | 3 | 5 | 4 | "+1" | "+1" | ||||
Develop scheme for orchestrating ooni-probes | 3 | 3 | 5 | 5 | 4 | "+1" | |||||
Promote and further develop OONI on mobile (Android, iOS) | 3 | 4 | 4 | 5 | 4 | ||||||
Get daily OONI measurements from 50 countries | 4 | 4 | 2 | 5 | 3.75 | ||||||
Publish monthly reports about the status of internet censorship in a country | 4 | 5 | 2 | 4 | 3.75 | ||||||
Implement a GUI for ooniprobes | 3 | 3 | 5 | 4 | 3.75 | ||||||
Do research based on OONI | 3 | 3 | 5 | 3.666666667 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
test_name: dns_injection | |
test_version: 0.0.1 | |
probe_ip: 127.0.0.1 | |
software_name: ight | |
software_version: 0.0.1 | |
data_format_version: 0.1 | |
... | |
--- | |
input: google.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<polymer-element name="my-element"> | |
<template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from pprint import pprint | |
from base64 import b64decode | |
from twisted.internet import reactor, defer | |
from txtorcon import launch_tor, TorConfig, TorState | |
from twisted.internet.endpoints import TCP4ClientEndpoint | |
from twisted.internet.task import react | |
from twisted.web.client import readBody |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# random int generation as gist. | |
randint = lambda a,b: a + int(''.join("%x" % ord(i) for i in os.urandom(b-a+1)), 16) % (b - a + 1) |