docker – Diff between revs 9 and 47

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 9 Rev 47
Line 14... Line 14...
14 # # 14 # #
15 # In order to generate a control password, issue: tor --hash-password PWD # 15 # In order to generate a control password, issue: tor --hash-password PWD #
16 # where PWD is the desired control port password. After that, amend the # 16 # where PWD is the desired control port password. After that, amend the #
17 # tor configuration file to set the control port address, port and pass: # 17 # tor configuration file to set the control port address, port and pass: #
18 # # 18 # #
19 # ControlPort 0.0.0.0:8051 # 19 # ControlPort 0.0.0.0:8050 #
20 # HashedControlPassword 16:A482ADEAAWF43EE... # 20 # HashedControlPassword 16:A482ADEAAWF43EE... #
21 # # 21 # #
22 # Running: ./this-script ADDRESS PORT PASSWORD # 22 # Running: ./this-script ADDRESS PORT PASSWORD #
23 # where: # 23 # where: #
24 # * ADDRESS is the tor listening control address, # 24 # * ADDRESS is the tor listening control address, #
Line 26... Line 26...
26 # * PASSWORD is the plaintext control password # 26 # * PASSWORD is the plaintext control password #
27 # # 27 # #
28 # after which the return status can be checked on the shell with: # 28 # after which the return status can be checked on the shell with: #
29 # echo $? # 29 # echo $? #
30 ########################################################################### 30 ###########################################################################
-   31 log_user 0
Line 31... Line 32...
31   32  
32 set address [lindex $argv 0]; 33 set address [lindex $argv 0];
33 set port [lindex $argv 1]; 34 set port [lindex $argv 1];
Line 34... Line 35...
34 set password [lindex $argv 2]; 35 set password [lindex $argv 2];
35   36  
Line 36... Line 37...
36 set timeout 5 37 set timeout 5
-   38 spawn telnet $address $port
37 spawn telnet $address $port 39  
-   40 send "AUTHENTICATE \"$password\"\n"
-   41 expect {
-   42 -ex "250 OK\r\n" {}
-   43 -ex "515 Authentication failed: Password did not match HashedControlPassword value from configuration\r\n" {
-   44 log_user 1
-   45 puts "0"
-   46 exit 1
-   47 }
-   48 timeout {
-   49 log_user 1
-   50 puts "0"
38   51 exit 1
39 send "AUTHENTICATE \"$password\"\n" 52 }
40 expect "250 OK\r\n" 53 }
-   54 send "GETINFO status/circuit-established\n"
-   55 expect {
41 send "GETINFO status/circuit-established\n" 56 timeout {
42 expect { 57 log_user 1
43 timeout { 58 puts "0"
44 exit 1 59 exit 1
-   60 }
-   61 -ex "250-status/circuit-established=1\r\n250 OK\r\n"