commit 57a300305cd569f444d641cf1b25237e1e4b9be9 Author: aagbsn aagbsn@extc.org Date: Fri May 3 14:28:25 2013 +0800
Add inputProcessor to http_host --- nettests/manipulation/http_host.py | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/nettests/manipulation/http_host.py b/nettests/manipulation/http_host.py index d95d836..3f1e0c6 100644 --- a/nettests/manipulation/http_host.py +++ b/nettests/manipulation/http_host.py @@ -139,3 +139,13 @@ class HTTPHost(httpt.HTTPTest): self.report['transparent_http_proxy'] = True self.check_for_censorship(body)
+ def inputProcessor(self, filename=None): + """ + This inputProcessor extracts domain names from urls + """ + if filename: + fp = open(filename) + for x in fp.readlines(): + yield x.strip().split('//')[-1].split('/')[0] + fp.close() + else: pass
tor-commits@lists.torproject.org