I recently discovered you can control the tor service using the control port(9051). On linux, this was turned off by default. If you are running tor on linux, you have to edit /etc/torrc and enable the control port. Once you do you can login to this port using telnet and interact with the tor service. I wanted a way to automatically change my exit node interactively through scripts, so I found this useful.
Once you modify torrc, restart the tor service. When it's back up login to port 9051 on localhost using telnet. Next you have to authenticate by typing ' authenticate "" ' and if you did not enable any of the special authentication settings in the torrc(hash or cookie for example) then you should get an OK response from the service. After this type ' signal newnym ' which will(according to the tor control protocol spec.) switch to clean circuits, so new application requests don't share any circuits with old ones. Also clears your client-side DNS cache.
With nmap and proxychains this could make for a useful 'anonymous' scanning utility.
Example(scan:
hostname $: proxychains nmap -iR 7000000 -p23 -P0 -v --open > open-telnet.txt & # Scan for 7 million hosts looking for open telnet ports and save results to a file
hostname $: while true; do python new-proxy.py; sleep 300; done & # Every 5 min call a python script that uses telnetlib to issue tor control command to effectively renew proxy
While all this runs in the background, you could parse the file with a script to try default/weak username/password combinations on any active hosts, logging any success to a file for later exploration