[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r14837: Fixes a bug where user supplied ips wouldn't be split and re (check/trunk/cgi-bin)
Author: ioerror
Date: 2008-05-29 23:10:59 -0400 (Thu, 29 May 2008)
New Revision: 14837
Modified:
check/trunk/cgi-bin/TorBulkExitList.py
Log:
Fixes a bug where user supplied ips wouldn't be split and reversed properly.
Modified: check/trunk/cgi-bin/TorBulkExitList.py
===================================================================
--- check/trunk/cgi-bin/TorBulkExitList.py 2008-05-30 00:18:01 UTC (rev 14836)
+++ check/trunk/cgi-bin/TorBulkExitList.py 2008-05-30 03:10:59 UTC (rev 14837)
@@ -136,20 +136,25 @@
def isUsingTor(clientIp, ELTarget, ELPort):
- stripIP = clientIp.rstrip('\n')
- splitIp = stripIP.split('.')
- splitIp.reverse()
- ELExitNode = ".".join(splitIp)
-
if ELPort is None:
# We'll attempt to reach this port on the Target host
ElPort = "80"
if ELTarget is None:
- # We'll try to reach this host
- ELTarget = "217.247.237.209"
+ # We'll try to reach this host as a reasonable default
+ ELTarget = "209.237.247.217"
+ stripIP = clientIp.rstrip('\n')
+ splitIp = stripIP.split('.')
+ splitIp.reverse()
+ ELExitNode = ".".join(splitIp)
+
+ stripIP = ELTarget.rstrip('\n')
+ splitIp = stripIP.split('.')
+ splitIp.reverse()
+ ELTarget = ".".join(splitIp)
+
# This is the ExitList DNS server we want to query
ELHost = "ip-port.exitlist.torproject.org"