Skip to content

Instantly share code, notes, and snippets.

@sinsukehlab
Created November 8, 2022 07:28
Show Gist options
    • Learn more about clone URLs
  • Save sinsukehlab/88433b1315578c1912af3f9bcdcbcba6 to your computer and use it in GitHub Desktop.
  • Learn more about clone URLs
Save sinsukehlab/88433b1315578c1912af3f9bcdcbcba6 to your computer and use it in GitHub Desktop.

Revisions

  1. sinsukehlab created this gist Nov 8, 2022.
    10 changes: 10 additions & 0 deletions 10 edittorrc.sh
    Original 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)')
Morty Proxy This is a proxified and sanitized view of the page, visit original site.