#! /bin/zsh # # this file: # https://dataswamp.org/~incal/conf/.zsh/tor tor-restart () { sudo /etc/init.d/tor restart } tor-new () { local ifconf=ifconfig.me local lhost=127.0.0.1 local cntr_port=9051 local not=$(curl --silent $ifconf | head -n 1) echo "noT:" $not local old=$(torsocks curl --silent $ifconf | head -n 1) echo "old:" $old echo -e 'AUTHENTICATE ""\r\nsignal NEWNYM\r\nQUIT' | nc $lhost $cntr_port > /dev/null local new=$(torsocks curl --silent $ifconf | head -n 1) echo "new:" $new }