我正在使用tor-request
节点模块并遇到问题。我已经按照我能找到的所有步骤和方向,在线搜索了每个网站,并且我已经重新启动了我的计算机。我不能完成我的项目,真的很挣扎。我一直在双重引用错误。我很感激任何帮助。
//开始了
tor &
我使用tor --hash-password "myPasswordHere" | tail -n 1
//I also tried
tor --hash-password myPasswordHereWithOutQuotes
// torr file
ControlPort 9051
HashedControlPassword 16:7{{numbers that ^^ returned}}786C1
// index.js / tor-request
var TorControlPort = {
password: "myPasswordHere",
host: 'localhost',
port: 9051,
...
错误Uncaught Error: Error communicating with Tor ControlPort
551 Invalid quoted string. You need to put the password in double quotes.
答案 0 :(得分:2)
这看起来像是图书馆中的一个错误。
我查看了源代码here,看起来该库并没有引用密码。
相关代码:
var commands = [
'authenticate '+ password +'', // authenticate the connection
正如您所看到的,密码未被引用。
您应该能够使用的临时解决方法是将您的ascii密码转换为十六进制密码,Tor将允许不带引号。例如password
= 70617373776f7264
。
答案 1 :(得分:1)
drew010是正确的。我已经回应了github问题并推出了修复程序并更新了README以便更有帮助。
可悲的是,我不能对drew010的回复进行投票或评论,因为我没有要求声誉。
[编辑] :(我是tor-request模块的作者)