/ proxy_wrapper.py
proxy_wrapper.py
1 import socks 2 import socket 3 import requests 4 5 # Configure the Chain: Tor (9050) -> Private SOCKS5 -> Target 6 def setup_ghost_chain(): 7 # Tunneling all socket traffic through the chain 8 socks.set_default_proxy(socks.SOCKS5, "127.0.0.1", 9050) 9 socket.socket = socks.socksocket 10 11 # Test the chain 12 try: 13 ip = requests.get('https://api.ipify.org').text 14 print(f"[*] [GHOST] Traffic Tunneled. Exit Node IP: {ip}") 15 except: 16 print("[-] [GHOST] Chain broken. Entering silence mode.") 17 18 if __name__ == "__main__": 19 setup_ghost_chain()