RA
Raunaksplanet/Tor-IP-Changer-Script
Tor IP Changer Script is a Python utility designed to automate the process of changing your IP address through the Tor network.
Tor IP Changer Script
Overview
The Tor IP Changer Script is a Python utility designed to automate the process of changing your IP address through the Tor network. It provides both single-use and continuous IP rotation capabilities, making it useful for privacy-conscious users, researchers, and developers who need to regularly change their network identity.
Demo Video
๐น View Demo Video
Features
- Automatic Dependency Installation: Installs required packages including Tor and Python dependencies
- Tor Configuration Management: Automatically configures Tor with proper control port settings
- IP Address Verification: Checks and displays your current external IP address
- Single IP Change: Change your Tor exit node once and exit
- Continuous IP Rotation: Continuously change IP addresses at customizable intervals
- Graceful Shutdown: Properly handles controller connections and cleanup
Requirements
- Linux operating system (tested on Kali Linux, Ubuntu, Debian)
- Python 3.x
- sudo privileges for package installation and Tor configuration
Installation
- Clone or download the script to your local machine
git clone https://github.com/Raunaksplanet/Tor-IP-Changer-Script.git- Go to the directory
cd Tor-IP-Changer-Script- Install the dependencies
pip install -r requirements.txt- Make the script executable if desired:
chmod +x torIPChangerScript.pyUsage
First-Time Setup (Install Dependencies)
sudo python3 torIPChangerScript.py --breakContinuous IP Rotation (Every 10 seconds)
sudo python3 torIPChangerScript.py --break --continuousCustom Interval Rotation (Every 5 seconds example)
sudo python3 torIPChangerScript.py --break --continuous --interval 5Single IP Change
sudo python3 torIPChangerScript.py --breakHow It Works
- Dependency Installation: The script installs Tor, Python pip, and required Python packages (stem, requests with SOCKS support)
- Tor Configuration: Configures Tor to run with:
- SOCKS proxy on port 9050
- Control port on 9051
- Disabled cookie authentication for controller access
- Controller Connection: Establishes a connection to the Tor control port
- IP Rotation: Sends NEWNYM signals to Tor to request new circuits
- IP Verification: Uses httpbin.org to verify IP address changes
Command Line Arguments
--break: Install dependencies and configure Tor (required for first run)--continuousor--loop: Enable continuous IP rotation--interval [seconds]: Set custom interval for IP changes (default: 10 seconds)
File Structure
torIPChangerScript.py: Main script file/etc/tor/torrc: Tor configuration file (automatically modified by the script)
Important Notes
- The script requires root privileges to install packages and modify Tor configuration
- Continuous mode runs until manually stopped with Ctrl+C
- The script includes proper error handling and cleanup procedures
- IP changes may take a few seconds to propagate through the Tor network
Troubleshooting
- Port Already in Use: If ports 9050 or 9051 are already occupied, the script will detect this and skip Tor restart
- Controller Connection Issues: Ensure Tor is running and properly configured
- IP Verification Failures: Check internet connectivity and Tor network status
Security Considerations
- This script modifies system-wide Tor configuration
- Use with caution on production systems
- Consider the legal and ethical implications of frequent IP changes in your jurisdiction
License
This script is provided for educational and research purposes. Users are responsible for complying with local laws and terms of service.