2010-12-01 33 views
1

我試圖基本上通過Tor control protocol呼叫signal newnym呼叫綁定到一個內部端口。爲了測試,我現在嘗試沒有任何授權字段。來自Perl的TOR控制協議

在telnet中,如果我只是撥打AUTHENTICATE,我會得到身份驗證,然後可以繼續進行信號調用。

在Perl中使用IO::SocketSocketsend方法,我結束了這個錯誤:

551 Invalid quoted string. You need to put the password in double quotes.

我正在使用IO ::插座示例調用看起來大約是這樣的:

print "SIG-TOR:Connecting..."; 

my $TORSOCK = new IO::Socket::INET(
    PeerAddr => $torcont, 
    PeerPort => $torconp, 
    Proto => 'tcp' 
); 
$TORSOCK or die "no socket :$!"; 

print "OK!\n"; 

print "SIG-TOR:authenticating..."; 

print $TORSOCK $torauth; 

while (<$TORSOCK>) { 
    print $_; 
} 

print "OK!\n"; 
sleep(1); 
+0

`$ torauth`的值是多少? – DVK 2010-12-01 02:27:40

回答

1

551 Invalid quoted string. You need to put the password in double quotes.

我推斷

print $TORSOCK '"', $torauth, '"'; 

的需要,但你必須某些什麼是在$ torauth。