aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-01-14 03:16:06 +0000
committerRoger Dingledine <arma@torproject.org>2007-01-14 03:16:06 +0000
commitb955ddbee2d1a69c10c40b1dd2e505ca1406db60 (patch)
tree0e3b188e8ed14a15f2853044431ea79291443432
parenta28f4ad4ae148db44135b12456f10d3b3e0640dd (diff)
downloadtor-b955ddbee2d1a69c10c40b1dd2e505ca1406db60.tar.gz
tor-b955ddbee2d1a69c10c40b1dd2e505ca1406db60.zip
Adapt a patch from goodell to let the contrib/exitlist script
take arguments rather than require direct editing. svn:r9346
-rw-r--r--ChangeLog3
-rwxr-xr-xcontrib/exitlist32
2 files changed, 30 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 12873fd794..e60237baa5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,10 @@
Changes in version 0.1.2.7-alpha - 2007-??-??
-
o Minor features:
- Check for addresses with invalid characters at the exit as well as at
the client, and warn less verbosely when they fail. You can override
this by setting ServerDNSAllowNonRFC953Addresses to 1.
+ - Adapt a patch from goodell to let the contrib/exitlist script
+ take arguments rather than require direct editing.
o Major bugfixes:
- Fix a crash bug in the presence of DNS hijacking (reported by Andrew
diff --git a/contrib/exitlist b/contrib/exitlist
index de26dab89c..86295c7d87 100755
--- a/contrib/exitlist
+++ b/contrib/exitlist
@@ -10,11 +10,11 @@
example usage (Tor 0.1.0.x and earlier):
- python exitlist < ~/.tor/cached-directory
+ python exitlist 18.244.0.188:80 < ~/.tor/cached-directory
example usage (Tor 0.1.1.10-alpha and later):
- cat ~/.tor/cached-routers* | python exitlist
+ cat ~/.tor/cached-routers* | python exitlist 18.244.0.188:80
If you're using Tor 0.1.1.18-rc or later, you should look at
the "FetchUselessDescriptors" config option in the man page.
@@ -41,10 +41,11 @@ INVERSE = False
#
# Change this list to contain all of the target services you are interested
# in. It must contain one entry per line, each consisting of an IPv4 address,
-# a colon, and a port number.
+# a colon, and a port number. This default is only used if we don't learn
+# about any addresses from the command-line.
#
ADDRESSES_OF_INTEREST = """
- 192.168.0.1:80
+ 1.2.3.4:80
"""
@@ -208,6 +209,29 @@ def uniq_sort(lst):
return lst
def run():
+ global VERBOSE
+ global INVERSE
+ global ADDRESSES_OF_INTEREST
+
+ if len(sys.argv) > 1:
+ try:
+ opts, pargs = getopt.getopt(sys.argv[1:], "vx")
+ except getopt.GetoptError, e:
+ print """
+usage: %s [-v] [-x] [host:port [host:port [...]]]
+ -v verbose output
+ -x invert results
+""" % sys.argv[0]
+ sys.exit(0)
+
+ for o, a in opts:
+ if o == "-v":
+ VERBOSE = True
+ if o == "-x":
+ INVERSE = True
+ if len(pargs):
+ ADDRESSES_OF_INTEREST = "\n".join(pargs)
+
servers = []
policy = []
name = ip = None