Skip to content

Instantly share code, notes, and snippets.

@rm-onata
Created March 3, 2024 08:57
Show Gist options
  • Save rm-onata/0b75389d353f9f95f8c40e6129035be4 to your computer and use it in GitHub Desktop.
Save rm-onata/0b75389d353f9f95f8c40e6129035be4 to your computer and use it in GitHub Desktop.
TOR Auto IP changer
import requests
import time,os
"""
First Enter this Command
#~> tor HTTPTunnelPort 8000
"""
#colors
URed = "\033[1;31m"
BWhite = "\033[1;37m"
url = "https://api.ipify.org"
prxy = {"http":"127.0.0.1:8000", "https":"127.0.0.1:8000"}
while True:
try:
res = requests.get(url, proxies=prxy).text
print(res)
time.sleep(10)
os.system("killall -HUP tor")
except requests.exceptions.ProxyError:
print(URed+"Connection Erorr."+BWhite)
time.sleep(20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment