[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Add software version to the report



commit a4708eaad29e275dc67b80ad767b3e17cc63abb8
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Sun Nov 11 11:51:46 2012 +0100

    Add software version to the report
    * Cleanup some debug messages
    * Remove unused ooni-probe.conf config file
---
 ooni/__init__.py     |    4 ++
 ooni/inputunit.py    |    2 +-
 ooni/ooni-probe.conf |  100 --------------------------------------------------
 ooni/reporter.py     |    6 ++-
 ooni/runner.py       |    3 +-
 5 files changed, 11 insertions(+), 104 deletions(-)

diff --git a/ooni/__init__.py b/ooni/__init__.py
index 16b20ca..2763b16 100644
--- a/ooni/__init__.py
+++ b/ooni/__init__.py
@@ -1,3 +1,4 @@
+# -*- encoding: utf-8 -*-
 from . import config
 from . import inputunit
 from . import kit
@@ -12,3 +13,6 @@ from . import utils
 __all__ = ['config', 'inputunit', 'kit',
            'lib', 'nettest', 'oonicli', 'reporter',
            'runner', 'templates', 'utils']
+
+__author__ = "Arturo Filastò"
+__version__ = "0.0.7.1-alpha"
diff --git a/ooni/inputunit.py b/ooni/inputunit.py
index 484631b..65f6d91 100644
--- a/ooni/inputunit.py
+++ b/ooni/inputunit.py
@@ -6,7 +6,7 @@
 # units. Input units are how the inputs to be fed to tests are
 # split up into.
 #
-# :authors: Arturo Filastò, Isis Lovecruft
+# :authors: Arturo Filastò
 # :license: see included LICENSE file
 
 
diff --git a/ooni/ooni-probe.conf b/ooni/ooni-probe.conf
deleted file mode 100644
index 0c68fe0..0000000
--- a/ooni/ooni-probe.conf
+++ /dev/null
@@ -1,100 +0,0 @@
-# ooni-probe
-#
-# These are the global configuration parameters necessary to
-# make ooni-probe work
-[main]
-reportdir = reports/
-logfile = ooniprobe.log
-assetdir = assets/
-testdir = oonitests/
-
-loglevel = DEBUG
-consoleloglevel = DEBUG
-proxyaddress = 127.0.0.1:9050
-
-# The following configurations are for searching for PlanetLab
-# nodes, adding them to a slice, and PlanetLab general API
-# authentication:
-pl_username = yourusername
-pl_password = yourpassword
-
-# These are configurations specific to the tests that should be
-# run by ooni-probe
-[tests]
-run = dnstamper
-### DNS testing related config parameters
-
-# This is the list of hostnames that must be looked up
-dns_experiment = top-1m.txt
-
-# This is the dns servers to be tested
-dns_experiment_dns = dns_servers.txt
-
-# This is the control known good DNS server
-dns_control_server = 91.191.136.152
-
-# Specify whether the dnstamper test should attempt to remove 
-# GeoIP-based false positives by doing a reverse DNS resolve
-# 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
-traceroute = example_exp_list.txt
-
-# This is the list of ports that should be used
-# src_x,src_y,src_z|dst_x,dst_y,dst_z
-traceroute_ports = 0,53,80,123,443|0,53,80,123,443
-
-# The protocol to be used in the scan
-traceroute_proto = UDP, TCP, ICMP
-
-### keyword injection related tests
-
-# List of keywords
-keywords = keywordlist.txt
-
-# hosts
-keywords_hosts = hostslist.txt
-
-# Methods to be used for testing
-keyword_method = http,telnet
-
-### Tor bridge testing
-
-tor_bridges = bridgetests.txt
-tor_bridges_timeout = 40
-
-[report]
-file = report.log
-timestamp = true
-#ssh = 127.0.0.1:22
-#ssh_user = theusername
-#ssh_password = thepassword
-#ssh_keyfile = ~/.ssh/mykey_rsa
-#ssh_rpath = ~/ooni-probe/
-#tcp = "127.0.0.1:9088"
diff --git a/ooni/reporter.py b/ooni/reporter.py
index b625603..eea44c7 100644
--- a/ooni/reporter.py
+++ b/ooni/reporter.py
@@ -51,6 +51,8 @@ def safe_dump(data, stream=None, **kw):
 
 @defer.inlineCallbacks
 def getTestDetails(options):
+    from ooni import __version__ as software_version
+
     client_geodata = {}
 
     if config.privacy.includeip or \
@@ -87,9 +89,11 @@ def getTestDetails(options):
                     'probe_ip': client_geodata['ip'],
                     'test_name': options['name'],
                     'test_version': options['version'],
+                    'software_name': 'ooniprobe',
+                    'software_version': software_version
                     }
     defer.returnValue(test_details)
-    
+
 
 class OReporter(object):
     def createReport(options):
diff --git a/ooni/runner.py b/ooni/runner.py
index 07882cf..c6679c0 100644
--- a/ooni/runner.py
+++ b/ooni/runner.py
@@ -192,13 +192,12 @@ def runTestWithInputUnit(test_class,
     dl = []
     log.debug("input unit %s" % input_unit)
     for test_input in input_unit:
-        log.debug("IU: %s" % test_input)
+        log.debug("running with input: %s" % test_input)
         try:
             d = runTestWithInput(test_class, 
                     test_method, test_input, oreporter)
         except Exception, e:
             print e
-        log.debug("here y0")
         dl.append(d)
     return defer.DeferredList(dl)
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits