SOCKS/Tor credential randomization to force new circuits with each outbound connection.

shw_dev
shw 7 years ago
parent 604c157a7b
commit de4f6ac206

@ -5,6 +5,7 @@ import (
"net"
"os"
"sync"
"time"
"github.com/subgraph/go-procsnitch"
"strings"
@ -157,6 +158,11 @@ func (c *socksChainSession) sessionWorker() {
return
}
// Randomize username and password to force a new TOR circuit with each connection
rndbytes := []byte("sgfw" + strconv.Itoa(int(time.Now().UnixNano()) ^ os.Getpid()))
c.req.Auth.Uname = rndbytes
c.req.Auth.Passwd = rndbytes
switch c.req.Cmd {
case CommandTorResolve, CommandTorResolvePTR:
err = c.dispatchTorSOCKS()

Loading…
Cancel
Save