diff --git a/README.md b/README.md index 834b8b7..d3dc093 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ script=/tmp/install_script.sh && curl -s https://git.thecoven.info/PrincessPi/ge * `large_file_search_for_hash` * `randomtoken` * `alfa_install_kali.sh` +* `torsilly.sh` #### monitoring * `mon-watch` diff --git a/customscripts/torsilly.sh b/customscripts/torsilly.sh new file mode 100644 index 0000000..d28f901 --- /dev/null +++ b/customscripts/torsilly.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# Usage: +## Install Tor +### sudo apt update; sudo apt install tor -y +## Edit /etc/tor/torrc +### sudo nano /etc/tor/torrc +#### Uncomment or add +##### ControlPort 9051 +#### Ucomment and change to (default value is 1, change to 0) +##### CookieAuthentication 0 +## Enable, Start, and Restart Tor +### sudo systemctl enable tor; sudo systemctl start tor; sleep 20; sudo systemctl restart tor + +# Configuration +TARGET_URL="https://canhazip.com" +TOR_PROXY="socks5h://127.0.0.1:9050" +TOR_CONTROL_PORT=9051 +DELAY=2 # Delay in seconds between requests + +# Ensure you respect HIBP's API rate limits and terms of service +while true; do + echo "[+] Requesting new Tor identity..." + + # Send NEWNYM signal to Tor Control Port to switch IP + echo -e 'AUTHENTICATE ""\r\nsignal NEWNYM\r\nQUIT' | nc 127.0.0.1 9051 > /dev/null + + # Give Tor a brief moment to establish the new circuit + sleep "$DELAY" + + echo "[+] Verifying current IP..." + CURRENT_IP=$(curl -s --proxy "$TOR_PROXY" https://canhazip.com) + echo "[+] Current Tor IP: $CURRENT_IP" + + echo "[+] Sending request to Have I Been Pwned..." + # 'socks5h://' ensures DNS resolution happens through Tor, preventing leaks + curl -s --proxy "$TOR_PROXY" -H "hibp-api-key: YOUR_API_KEY" "$TARGET_URL" + + echo -e "\n[+] Waiting for next iteration...\n" + sleep "$DELAY" +done