[or-cvs] r21327: {projects} Switch to using the merged consensuses and server descriptor (projects/archives/trunk/exonerator)

kloesing at seul.org kloesing at seul.org
Thu Dec 24 11:23:54 UTC 2009


Author: kloesing
Date: 2009-12-24 06:23:53 -0500 (Thu, 24 Dec 2009)
New Revision: 21327

Modified:
   projects/archives/trunk/exonerator/ExoneraTor.java
   projects/archives/trunk/exonerator/HOWTO
   projects/archives/trunk/exonerator/exonerator.py
Log:
Switch to using the merged consensuses and server descriptors as linked
from the metrics website.


Modified: projects/archives/trunk/exonerator/ExoneraTor.java
===================================================================
--- projects/archives/trunk/exonerator/ExoneraTor.java	2009-12-24 05:05:24 UTC (rev 21326)
+++ projects/archives/trunk/exonerator/ExoneraTor.java	2009-12-24 11:23:53 UTC (rev 21327)
@@ -121,7 +121,7 @@
     for (File consensusDir : consensusDirs)
       directoriesLeftToParse.push(consensusDir);
     SimpleDateFormat consensusTimeFormat = new SimpleDateFormat(
-        "yyyy-MM-dd-HH:mm:ss");
+        "yyyy-MM-dd-HH-mm-ss");
     consensusTimeFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
     while (!directoriesLeftToParse.isEmpty()) {
       File directoryOrFile = directoriesLeftToParse.pop();

Modified: projects/archives/trunk/exonerator/HOWTO
===================================================================
--- projects/archives/trunk/exonerator/HOWTO	2009-12-24 05:05:24 UTC (rev 21326)
+++ projects/archives/trunk/exonerator/HOWTO	2009-12-24 11:23:53 UTC (rev 21327)
@@ -42,13 +42,17 @@
   http://pypi.python.org/pypi/IPy/ or using "apt-get install python-ipy" on
   Debian-based systems.
 
-- Copy the consensuses-* and server-descriptors-* files of the relevant
-  time from http://archive.torproject.org/tor-directory-authority-archive/
-  and extract them to a directory in your working directory, e.g.
-  /home/you/exonerator/data/ . Don't rename the extracted directories or
-  any of the contained files, or the script won't find the contained
-  descriptors.
+- Download the v3 consensuses and server descriptors of the relevant time
+  from http://metrics.torproject.org/data.html and extract them to a
+  directory in your working directory, e.g. /home/you/exonerator/data/ .
+  Don't rename the extracted directories or any of the contained files, or
+  the script won't find the contained descriptors.
 
+  Note that you only need the server descriptors if you want to learn
+  whether a given IP address permits exiting to a given target. If you
+  only want to learn whether that IP address was a Tor relay, you don't
+  need them.
+
 - Run the script, providing it with the parameters it needs:
 
   python exonerator.py [--archive=<descriptor archive directory>]
@@ -59,9 +63,9 @@
   The --archive option defaults to data/ . In the following examples, it is
   assumed that this default applies.
 
-  Make sure that the timestamp is provided in UTC, which is similar to GMT,
-  and not in your local timezone! Otherwise, results will very likely be
-  wrong.
+  Make sure that the timestamp is provided in UTC, which is equivalent to
+  GMT, and not in your local timezone! Otherwise, results will very likely
+  be wrong.
 
   A sample invocation might be:
 
@@ -82,17 +86,16 @@
   http://www.bouncycastle.org/download/bcprov-jdk16-143.jar and put it in
   your working directory, e.g. /home/you/exonerator/ .
 
-- Copy the consensuses-* and server-descriptors-* files of the relevant
-  time from http://archive.torproject.org/tor-directory-authority-archive/
-  and extract them to a directory in your working directory, e.g.
-  /home/you/exonerator/data/ . Don't rename the extracted directories or
-  any of the contained files, or the script won't find the contained
-  descriptors.
+- Download the v3 consensuses and server descriptors of the relevant time
+  from http://metrics.torproject.org/data.html and extract them to a
+  directory in your working directory, e.g. /home/you/exonerator/data/ .
+  Don't rename the extracted directories or any of the contained files, or
+  the script won't find the contained descriptors.
 
-  Note that you only need the server-descriptors-* files if you want to
-  learn whether a given IP address permits exiting to a given target. If
-  you only want to learn whether that IP address was a Tor relay, you
-  don't need them.
+  Note that you only need the server descriptors if you want to learn
+  whether a given IP address permits exiting to a given target. If you
+  only want to learn whether that IP address was a Tor relay, you don't
+  need them.
 
 - Compile the (single) Java class using this command:
 
@@ -106,9 +109,9 @@
            <timestamp, in UTC, formatted as YYYY-MM-DD hh:mm:ss>
            [<target address>[:<target port>]]
 
-  Make sure that the timestamp is provided in UTC, which is similar to GMT,
-  and not in your local timezone! Otherwise, results will very likely be
-  wrong.
+  Make sure that the timestamp is provided in UTC, which is equivalent to
+  GMT, and not in your local timezone! Otherwise, results will very likely
+  be wrong.
 
   A sample invocation might be:
 

Modified: projects/archives/trunk/exonerator/exonerator.py
===================================================================
--- projects/archives/trunk/exonerator/exonerator.py	2009-12-24 05:05:24 UTC (rev 21326)
+++ projects/archives/trunk/exonerator/exonerator.py	2009-12-24 11:23:53 UTC (rev 21327)
@@ -144,7 +144,7 @@
             basename = os.path.basename(directoryOrFile)
             if (basename.endswith("consensus")):
                 consensusTime = time.strptime(basename[0:19],
-                                              "%Y-%m-%d-%H:%M:%S")
+                                              "%Y-%m-%d-%H-%M-%S")
                 if consensusTime >= timestampTooOld and \
                    consensusTime < timestampFrom:
                     tooOldConsensuses.add(directoryOrFile)



More information about the tor-commits mailing list