[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

RemoteControl dev trouble (510 Unrecognized command)



Hey,

I have been having some trouble with a python based Tor controller. After setting my local ControlPort in the Tor settings, and connecting, I am able to successfully authenticate, but then I am unable to get Tor to recognize any other commands.

More precisely,
   cx.sendall("authenticate " + pw + "\n\r")
   s = cx.recv(1024)
   print "Tor:", s
produces the response: Tor: 250 OK

But after authentication,
   cmd = "GETINFO version\n\r"
   cx.sendall(cmd)
   s = cx.recv(1024)
   print "Tor: ", s
produces, Tor: 510 Unrecognized command ""

I have also tried other commands, and none seem to be recognized. The command's case also does not matter. I have also tried injecting NL characters (chr(0) in python, the ascii character composed of 8 bits of value 0 in binary) before/after the \n\r, after the command (getinfo), after keyword (version).

If anyone has had previous experience, or might think they may know the root of the problem, I would be very grateful for any guidance / advice.

Just FYI for folks, I have been trying to follow the spec:
http://www.torproject.org/svn/trunk/doc/spec/control-spec.txt

PS - I have set no cookie or salted hashed password for the auth, but I don't think effect functionality matters.

Best Regards,
~Jon