Created
November 8, 2022 07:28
-
Star
0
(0)
You must be signed in to star a gist -
Fork
1
(1)
You must be signed in to fork a gist
-
-
Save sinsukehlab/88433b1315578c1912af3f9bcdcbcba6 to your computer and use it in GitHub Desktop.
Revisions
-
sinsukehlab created this gist
Nov 8, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #!/bin/sh badexitpath='http://dud2sxm6feahhuwj4y4lzktduy7v3qpaqsfkggtj2ojmzathttkegoid.onion/summary?flag=badexit' while IFS= read -r name && IFS= read -r finger; do echo $name echo $finger if [[ $(grep -c $name /etc/tor/torrc) == 0 && $(grep -c $finger /etc/tor/torrc) == 0 ]]; then echo "not found" sed -i "/^ExcludeNodes/s/$/,$finger/" /etc/tor/torrc fi done < <(torsocks curl -s ${badexitpath} | jq -r '.relays | .[] | (.n, .f)')