commit da4ad2f16e3bd7d87f8d66714452a2746518147c Author: Arturo Filastò arturo@filasto.net Date: Thu Feb 4 16:26:44 2016 +0100
Improvements to the output of the http_invalid_request_line test --- ooni/nettests/manipulation/http_invalid_request_line.py | 3 +++ ooni/templates/httpt.py | 4 ++-- ooni/templates/tcpt.py | 1 + 3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ooni/nettests/manipulation/http_invalid_request_line.py b/ooni/nettests/manipulation/http_invalid_request_line.py index b6ce2da..f81d953 100644 --- a/ooni/nettests/manipulation/http_invalid_request_line.py +++ b/ooni/nettests/manipulation/http_invalid_request_line.py @@ -45,8 +45,11 @@ class HTTPInvalidRequestLine(tcpt.TCPTest): def check_for_manipulation(self, response, payload): log.debug("Checking if %s == %s" % (response, payload)) if response != payload: + log.msg("Detected manipulation!") + log.msg(response) self.report['tampering'] = True else: + log.msg("No manipulation detected.") self.report['tampering'] = self.report['tampering'] | False
def test_random_invalid_method(self): diff --git a/ooni/templates/httpt.py b/ooni/templates/httpt.py index 15630d5..a49c39b 100644 --- a/ooni/templates/httpt.py +++ b/ooni/templates/httpt.py @@ -347,9 +347,9 @@ class HTTPTest(NetTestCase):
def errback(failure, request): if request['tor']['is_tor']: - log.err("Error performing torified request: %s" % request['url']) + log.err("Error performing torified HTTP request: %s" % request['url']) else: - log.err("Error performing request: %s" % request['url']) + log.err("Error performing HTTP request: %s" % request['url']) failure_string = handleAllFailures(failure) self.addToReport(request, failure_string=failure_string) return failure diff --git a/ooni/templates/tcpt.py b/ooni/templates/tcpt.py index bdedebc..5e1d21a 100644 --- a/ooni/templates/tcpt.py +++ b/ooni/templates/tcpt.py @@ -44,6 +44,7 @@ class TCPSender(protocol.Protocol): self.transport.write(payload)
class TCPSenderFactory(protocol.Factory): + noisy = False def buildProtocol(self, addr): return TCPSender()
tor-commits@lists.torproject.org