[or-cvs] [metrics-utils/master] Add user-agent string produced by TAILS 0.5.

karsten at torproject.org karsten at torproject.org
Tue Nov 30 12:48:27 UTC 2010


Author: karsten <karsten at mini.private>
Date: Tue, 30 Nov 2010 13:42:32 +0100
Subject: Add user-agent string produced by TAILS 0.5.
Commit: e3e9ec8848e949d38243a01ba7e338b67a602753

Robert Ransom points out that TAILS 0.5, and presumably other
installations of Torbutton 1.2.5, produce a user-agent string with
'chrome://global/locale/intl.properties' instead of a country/language
code like 'en-US'. Adding this user-agent string, so that we can identify
all Torbutton users.
---
 visitor/ChangeLog    |    1 +
 visitor/VisiTor.java |    4 ++++
 visitor/visitor.py   |    4 ++++
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/visitor/ChangeLog b/visitor/ChangeLog
index 56af606..b553102 100644
--- a/visitor/ChangeLog
+++ b/visitor/ChangeLog
@@ -4,6 +4,7 @@ Changes in version 0.0.4 - 2010-1?-??
   - Don't omit the stats for the last date in the output. Found by Kiyoto
     Tamura.
   - Add a Python version of the parsing script written by Kiyoto Tamura.
+  - Add user-agent string produced by TAILS 0.5.
 
 Changes in version 0.0.3 - 2010-09-24
   - Support parsing .gz-compressed web server logs. Suggested by murb.
diff --git a/visitor/VisiTor.java b/visitor/VisiTor.java
index 8bdb3ff..d828518 100644
--- a/visitor/VisiTor.java
+++ b/visitor/VisiTor.java
@@ -29,6 +29,10 @@ public final class VisiTor {
      * commits: 48b8300, 0776f7e, cc15032, 6fdfd5a */
     SortedMap<String, Pattern> torbuttonUserAgents =
         new TreeMap<String, Pattern>();
+    torbuttonUserAgents.put("torbutton1_2_5_tails", Pattern.compile(
+        "Mozilla/5\\.0 \\(Windows; U; Windows NT 6\\.1; "
+        + "chrome://global/locale/intl.properties; rv\\:1\\.9\\.2\\.3\\) "
+        + "Gecko/20100401 Firefox/3\\.6\\.3"));
     torbuttonUserAgents.put("torbutton1_2_5", Pattern.compile(
         "Mozilla/5\\.0 \\(Windows; U; Windows NT 6\\.1; "
         + "[a-z]{2}-[A-Z]{2}; rv\\:1\\.9\\.2\\.3\\) "
diff --git a/visitor/visitor.py b/visitor/visitor.py
index 39cd50e..b18e0ef 100644
--- a/visitor/visitor.py
+++ b/visitor/visitor.py
@@ -27,6 +27,10 @@ TOR_USERAGENTS = [('torbutton1_2_0', re.compile(r'^"Mozilla/5\.0 \(Windows; U; W
                                                 r'Gecko/2009021910 Firefox/3\.0\.7"$')),
                   ('torbutton1_2_5', re.compile(r'^"Mozilla/5\.0 \(Windows; U; Windows NT 6\.1; '
                                                 r'[a-z]{2}-[A-Z]{2}; rv:1\.9\.2\.3\) '
+                                                r'Gecko/20100401 Firefox/3\.6\.3"$')),
+                  ('torbutton1_2_5_tails', re.compile(r'^"Mozilla/5\.0 \(Windows; U; Windows NT 6\.1; '
+                                                r'chrome://global/locale/intl.properties; '
+                                                r'rv:1\.9\.2\.3\) '
                                                 r'Gecko/20100401 Firefox/3\.6\.3"$'))
                   ]
 
-- 
1.7.1



More information about the tor-commits mailing list