Tor Scapy Application is a simple yet powerful tool that combines Stem and Scapy to send network packets anonymously through the Tor network. It can start a Tor process, connect to it, and rotate your Tor identity on demand. Perfect for network analysis, testing, or just playing with Tor + Python magic.
- Launch a Tor process programmatically
- Connect to an existing Tor controller
- Rotate Tor identities on the fly (NEWNYM signal)
- Send ICMP packets via Tor SOCKS5 proxy
- Easy to customize for your own network tasks
- Python 3.x
- Stem Python library
- Scapy Python library
- Tor installed and running (or launched via script)
-
Install Python 3.x: https://www.python.org/downloads/
-
Install required Python packages:
pip install -r requirements.txt
(Make sure requirements.txt includes
stem
andscapy
) -
Install and start Tor:
- Download from https://www.torproject.org/
- Or let the script launch Tor automatically
Run the app:
python tor_scapy_app.py
or
python3 tor_scapy_app.py
By default, it sends an ICMP (ping) packet to 8.8.8.8
through the Tor network and shows the response.
- Modify
start_tor_process()
to add your Tor configs (e.g., ports, bridges) - Change the
destination_ip
variable in__main__
to target a different host - Extend
send_packet_via_tor()
to send other packet types supported by Scapy
- The script requires the Tor control port (
9051
by default) to be enabled and accessible - Identity change takes a few seconds (
time.sleep(5)
after NEWNYM signal) - Running with root/admin privileges may be needed for sending raw packets
- Use responsibly and respect network policies and laws
Visit https://volkansah.github.io for more projects
This project is licensed under the MIT License — do what you want, just keep it cool.