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

[tor-commits] [ooni-probe/master] Remove dead code.



commit a6eebf219c45431721071baa2b295bf1bd1c77fd
Author: Arturo Filastò <hellais@xxxxxxxxxxxxxx>
Date:   Sat Jun 2 21:10:15 2012 +0200

    Remove dead code.
---
 ooni/assets/tcpscan.txt |    1 +
 ooni/plugoo/__init__.py |   33 ---------------------------------
 2 files changed, 1 insertions(+), 33 deletions(-)

diff --git a/ooni/assets/tcpscan.txt b/ooni/assets/tcpscan.txt
index f67dce3..4204d77 100644
--- a/ooni/assets/tcpscan.txt
+++ b/ooni/assets/tcpscan.txt
@@ -1 +1,2 @@
 127.0.0.1:9050
+127.0.0.1:6666
diff --git a/ooni/plugoo/__init__.py b/ooni/plugoo/__init__.py
index 650cea0..f3a49e9 100644
--- a/ooni/plugoo/__init__.py
+++ b/ooni/plugoo/__init__.py
@@ -17,15 +17,8 @@ import os
 from datetime import datetime
 import yaml
 
-try:
-    import socks
-except:
-    "Error SocksiPy is not installed!"
-import socket
-
 import logging
 import itertools
-import gevent
 
 def gen_headers(self, options="common"):
     """
@@ -52,29 +45,3 @@ def gen_headers(self, options="common"):
         return False
 
     return headers
-
-
-class torify(object):
-    """This is the torify decorator. It should be used to
-    decorate functions that should use to for connecting to
-    the interwebz. The suggary syntax is the following:
-    @torify([urllib2])
-    def myfunction():
-        f = urllib2.urlopen('https://torproject.org/')
-    remember to set the proxyaddress in the config file.
-    """
-    def __init__(self, f):
-        print f
-        self.f = f
-
-    def __get__(self, instance, owner):
-        self.modules = instance.modules
-        def decorator(*args):
-            print instance.config.main.proxyaddress
-            host, port = instance.config.main.proxyaddress.split(":")
-            socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, host, int(port))
-            # Wrap the modules into socks
-            for module in self.modules:
-                socks.wrapmodule(module)
-            return self.f(instance, *args)
-        return decorator
diff --git a/oonib/oonibackend.py b/oonib/oonibackend.py
old mode 100644
new mode 100755



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