【问题标题】:TOR Control Protocol from PerlPerl 的 TOR 控制协议
【发布时间】:2010-12-01 01:41:41
【问题描述】:

我试图通过绑定到内部端口的Tor control protocol 进行signal newnym 调用。只是为了测试,我目前正在尝试没有任何身份验证字段。

在 telnet 中,如果我只是拨打 AUTHENTICATE,我会通过身份验证,然后可以继续发出呼叫信号。

在 perl 中使用 both IO::SocketSocket send 方法我最终得到了这个错误:

551 引用的字符串无效。您需要将密码放在双引号中。

我在 IO::Socket 中使用的示例调用大致如下所示:

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);

【问题讨论】:

  • $torauth的值是多少?

标签: perl sockets controls tor


【解决方案1】:

来自

551 引用的字符串无效。您需要将密码放在双引号中。

我会推断需要

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

但您需要确定 $torauth 中的内容。

【讨论】:

    猜你喜欢
    • 2011-02-14
    • 1970-01-01
    • 1970-01-01
    • 2015-03-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多