Simple Python Script to Find the Blocked website URL using Tor Proxy.
Using Python requests with TOR Proxy Connection
pip install requests
pip install -U requests[socks]
find.py
import sys
import requests
proxies = {'http': 'socks5://127.0.0.1:9050',
'https': 'socks5://127.0.0.1:9050'}
s = requests.Session()
s.proxies = proxies
try:
r = s.get('http://example.com')
except requests.ConnectionError as e:
print("OOPS!! Connection Error - May be Tor is Not Enabled or Can't Bypass them")
except requests.Timeout as e:
print("OOPS!! Timeout Error")
except requests.RequestException as e:
print("OOPS!! General Error (Enter a Valid URL) - Add HTTP/HTTPS infront of the URL")
except (KeyboardInterrupt, SystemExit):
print("Ok ok, quitting")
sys.exit(1)
else:
print(r.url + " - is an Current Live and Active URL")