I found the tor-ctrl an awesome tool and implemented most of the changes you wanted from above.
Also implemented a way to use setevents, see examples directory for listing circuit path or even streams organized and showing the final target.
my fork is on github and has the same name, I can’t include links.
-a
is removed and the cookie file is discovered by sending PROTOCOLINFO
to the controller.
-c
command be avoided not implemented
-f
removed
sleep 1
if the program used is telnet, else for socat
and nc/netcat
sleep 0 by default. Sleep time can till be set with the -t [time]
option.
tor's socket
can be used for tcp or for unix domain, format is [addr:]port or [unix:]path. If none is presented, fallback to 9051, which although debian default is /run/tor/control, I made the script to be portable and not depend on debian an bash, but this can be easily fixed on one line
setevents must be used with -w
to await for user confirmation with an enter
Also, I don’t understand why it is not supported upstream just because it has a default path to ControlSocket? I see that as a gain to not specify one more thing on debian systems.
For now, I removed the deficencies on the script, so no need to specify anymore the cookie file path, the time and it is verbose by default, quiet -q
only if you want.
The main thing is missing for me is SAFECOOKIE option to authenticate, which avoids leakage that happens with COOKIE and HASHEDPASSWORD.