https://github.com/grassleaff/iptorch
iptorch is a IP rotator tool for periodically change Tor exit IP, written in Bash and with multiple utils built-in to turn everything more easy to you.
https://github.com/grassleaff/iptorch
anonymize anonymous bash-script ethical-hacking ethical-hacking-tools ip-changer ipchanger network socks5 tor-network
Last synced: 19 days ago
JSON representation
iptorch is a IP rotator tool for periodically change Tor exit IP, written in Bash and with multiple utils built-in to turn everything more easy to you.
- Host: GitHub
- URL: https://github.com/grassleaff/iptorch
- Owner: grassleaff
- License: gpl-2.0
- Created: 2025-10-09T23:21:11.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-12-03T12:07:24.000Z (6 months ago)
- Last Synced: 2026-02-20T06:48:58.942Z (3 months ago)
- Topics: anonymize, anonymous, bash-script, ethical-hacking, ethical-hacking-tools, ip-changer, ipchanger, network, socks5, tor-network
- Language: Shell
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---

[](https://www.torproject.org/)
[](./LICENSE)
**iptorch** is a Bash CLI tool that automates IP rotation through the Tor network using the ControlPort protocol. The script sends the SIGNAL NEWNYM command to Tor to request a new circuit, and consequently a new IP, at user-configurable intervals.
Communication with ControlPort is done via **netcat (nc)** or **socat**, with automatic fallback to service reload if authentication fails. The script supports authentication via password (HashedControlPassword) or via cookie (control.authcookie), detecting the default paths used by Tor.
The tool exposes a classic command line interface via getopts, allowing you to specify:
| Flag | Function |
| :---: | :---: |
| `-s` | **SECONDS** - Interval between IP changes |
| `-c` | **COUNT** - Number of rotations (0 = infinite) |
| `-p` | **CONTROL_PORT** - Tor ControlPort port (default: 9051) |
| `-P` | **PASSWORD** - Password set in torrc |
| `-t` | **SOCKS_PORT** - Tor SOCKS port (default: 9050) |
| `-S` | **SERVICE STAND MODE** - Does not terminate the Tor service when exiting |
| `-C / -w` | Displays **COPYRIGHT** and **WARRANTY** information (GPLv2) |
During execution, the script:
- **Checks root privileges** (required to manipulate services).
- **Detects the active service manager** (`systemd`, `sysvinit`, `openrc`, `runit`, `s6`) and starts Tor.
- **Attempts to authenticate on ControlPort**, prioritising `AUTHENTICATE` with password or cookie.
- **Repeatedly sends SIGNAL NEWNYM**, respecting the configured interval.
- Optionally, displays the current IP and geolocation via `curl + jq` using Tor's SOCKS proxy.
The script uses trap to capture shutdowns (SIGINT, SIGTERM) and ensure a clean shutdown of the Tor service, except when the -S flag is used.
## 📦 Dependencies
To ensure the script works properly, the following dependencies are recommended:
| Dependency | Reason |
| :---: | :---: |
| `tor` | Tor service for IP rotation |
| `curl` | IP query via Tor proxy |
| `jq` | JSON parser for geolocation |
| `nc` *(netcat)* or `socat` | Communication with ControlPort |
| `xxd` or `od` | Conversion of authentication cookie to HEX |
| `systemctl` / `service` / `rc-service` / `sv` / `s6-rc` | Tor service control |
> **NOTE:** Without `nc` or `socat`, the script enters fallback mode, attempting to `reload` Tor instead of `SIGNAL NEWNYM`.
## Installation
Clone the repository and grant execution permission:
```
git clone https://github.com/letterfenceglasses/iptorch.git
cd iptorch
chmod +x src/iptorch
sudo cp src/iptorch /usr/local/bin/iptorch
```
## Licence
Distributed under **GNU GPLv2**. Free to modify and redistribute, without warranty, see `iptorch -C` and `iptorch -w` to display the licence and warranty notices directly via the CLI.
---