[tbb-bugs] #9442 [Tor Browser]: Add New Circuit button to TorButton for TBB alpha 3.x

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Aug 9 14:35:43 UTC 2014


#9442: Add New Circuit button to TorButton for TBB alpha 3.x
-------------------------+-------------------------------------------------
     Reporter:           |      Owner:  tbb-team
  cypherpunks            |     Status:  new
         Type:           |  Milestone:
  enhancement            |    Version:
     Priority:  normal   |   Keywords:  tbb-newnym, tbb-easy, tbb-
    Component:  Tor      |  usability, extdev-interview, tbb-torbutton
  Browser                |  Parent ID:
   Resolution:           |
Actual Points:           |
       Points:           |
-------------------------+-------------------------------------------------

Comment (by toruser23):

 Since this hasn't been going anywhere fast for ages I at least have a way
 to bring back this functionally in the *nix realm:

 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!bash
 #!/bin/bash

 if [ -z "$(command -v xmessage)" ]; then
         echo "Error: Can't find xmessage"
         exit 1
 fi

 if [ -z "$(command -v hexdump)" ]; then
         xmsg_responce="$(xmessage -print "Error: Can't find hexdump")"
         echo "Error: Can't find hexdump"
         exit 1
 fi

 cookie_file="./tor-browser_en-US/Data/Tor/control_auth_cookie"

 if [ -r "$cookie_file" ]; then
         auth_cookie=$(hexdump -e '32/1 "%02x""\n"' $cookie_file)
 else
         xmsg_responce="$(xmessage -print "Error: Can't find cookie file")"
         echo "Error: Can't find cookie file"
         exit 1
 fi


 /usr/bin/expect &>/dev/null << EOF
 set timeout 20
 spawn telnet 127.0.0.1 9151
 expect -exact "Trying 127.0.0.1...\r
 Connected to 127.0.0.1.\r
 Escape character is '^]'.\r
 "
 send -- "AUTHENTICATE $auth_cookie\r"
 expect -exact "250 OK\r"
 send -- "signal NEWNYM\r"
 expect -exact "250 OK\r"
 send -- "quit\r"
 expect eof
 EOF

 exit_code="$?"

 if [ "$exit_code" == "0" ]; then
         xmsg_responce="$(xmessage -print -timeout 5 "Using new tor
 circut")"
         echo "Using new circut"
 else
         xmsg_responce="$(xmessage -print "Error: expect failed")"
         echo "Error: expect failed"
 fi
   }}}
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9442#comment:19>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tbb-bugs mailing list