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

[or-cvs] r17879: {torflow} Add curl proxy var back to speedracer and have metatroller u (torflow/trunk)



Author: mikeperry
Date: 2009-01-04 10:43:07 -0500 (Sun, 04 Jan 2009)
New Revision: 17879

Modified:
   torflow/trunk/metatroller.py
   torflow/trunk/speedracer.pl
Log:


Add curl proxy var back to speedracer and have metatroller use the control
port password from TorUtil.



Modified: torflow/trunk/metatroller.py
===================================================================
--- torflow/trunk/metatroller.py	2009-01-04 15:29:34 UTC (rev 17878)
+++ torflow/trunk/metatroller.py	2009-01-04 15:43:07 UTC (rev 17879)
@@ -28,7 +28,7 @@
 from TorCtl import TorUtil, PathSupport, TorCtl, StatsSupport
 from TorCtl.TorUtil import *
 from TorCtl.PathSupport import *
-from TorCtl.TorUtil import meta_port, meta_host, control_port, control_host
+from TorCtl.TorUtil import meta_port, meta_host, control_port, control_host, control_pass
 from TorCtl.StatsSupport import StatsHandler,StatsRouter
 
 mt_version = "0.1.0-dev"
@@ -240,7 +240,7 @@
   s.connect((control_host,control_port))
   c = PathSupport.Connection(s)
   c.debug(file("control.log", "w"))
-  c.authenticate()
+  c.authenticate(control_pass)
   h = StatsHandler(c, __selmgr)
 
   c.set_event_handler(h)

Modified: torflow/trunk/speedracer.pl
===================================================================
--- torflow/trunk/speedracer.pl	2009-01-04 15:29:34 UTC (rev 17878)
+++ torflow/trunk/speedracer.pl	2009-01-04 15:43:07 UTC (rev 17879)
@@ -13,12 +13,13 @@
 
 # http://bitter.stalin.se/torfile
 # http://www.sigma.su.se/~who/torfile
-my $URL = "https://svn.torproject.org/svn/tor/trunk/doc/design-paper/roadmap-future.pdf";; 
+my $URL = "https://svn.torproject.org/svn/tor/trunk/doc/design-paper/tor-design.pdf";; 
 my $COUNT = 200;
 my $START_PCT = 0;
 my $STOP_PCT = 80;
 my $PCT_STEP = 5;
 my $DOUBLE_FETCH = 0;
+my $CURL_PROXY="--socks4a 127.0.0.1:9060";
 
 my $LOG_LEVEL = "DEBUG";
 my %log_levels = ("DEBUG", 0, "INFO", 1, "NOTICE", 2, "WARN", 3, "ERROR", 4);
@@ -119,8 +120,8 @@
             
             $t0 = [gettimeofday()];
             $ret = 
-                system("tsocks wget -U \"$USER_AGENT\" \'$URL\' -O - 2>&1 > /dev/null");
-#                system("curl $CURL_PROXY -m 600 -A \"$USER_AGENT\" \'$URL\' >& /dev/null");
+#                system("tsocks wget -U \"$USER_AGENT\" \'$URL\' -O - 2>&1 > /dev/null");
+                system("curl $CURL_PROXY -m 600 -A \"$USER_AGENT\" \'$URL\' >& /dev/null");
 
             if($ret == 2) {
                 plog "NOTICE", "wget got Sigint. Dying\n";
@@ -145,8 +146,8 @@
                 $i++;
                 $t0 = [gettimeofday()];
                 $ret = 
-                system("tsocks wget -U \"$USER_AGENT\" \'$URL\' -O - 2>&1 > /dev/null");
-#                    system("curl $CURL_PROXY -m 600 -A \"$USER_AGENT\" \'$URL\' >& /dev/null");
+#                system("tsocks wget -U \"$USER_AGENT\" \'$URL\' -O - 2>&1 > /dev/null");
+                    system("curl $CURL_PROXY -m 600 -A \"$USER_AGENT\" \'$URL\' >& /dev/null");
 
                 if($ret == 2) {
                     plog "NOTICE", "wget got Sigint. Dying\n";