ipspoof 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ipspoof-2.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Your Name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
ipspoof-2.0.0/PKG-INFO ADDED
@@ -0,0 +1,241 @@
1
+ Metadata-Version: 2.4
2
+ Name: ipspoof
3
+ Version: 2.0.0
4
+ Summary: HTTP header/IP allowlist bypass discovery tool for authorized security testing
5
+ Author-email: Your Name <you@example.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/yourname/ipspoof
8
+ Project-URL: Repository, https://github.com/yourname/ipspoof
9
+ Project-URL: Issues, https://github.com/yourname/ipspoof/issues
10
+ Project-URL: Changelog, https://github.com/yourname/ipspoof/blob/main/CHANGELOG.md
11
+ Keywords: security,pentest,bugbounty,ip-spoof,header-bypass,xff,x-forwarded-for,allowlist
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Information Technology
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Security
24
+ Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: requests>=2.28
28
+ Requires-Dist: urllib3>=1.26
29
+ Provides-Extra: tor
30
+ Requires-Dist: requests[socks]>=2.28; extra == "tor"
31
+ Provides-Extra: dev
32
+ Requires-Dist: build; extra == "dev"
33
+ Requires-Dist: twine; extra == "dev"
34
+ Requires-Dist: pytest; extra == "dev"
35
+ Dynamic: license-file
36
+
37
+ # ipspoof
38
+
39
+ > HTTP header/IP allowlist bypass discovery tool for authorized security testing.
40
+
41
+ [![PyPI](https://img.shields.io/badge/pypi-v2.0.0-blue)](https://pypi.org/project/ipspoof/)
42
+ [![Python](https://img.shields.io/badge/python-3.8+-blue)](https://www.python.org/)
43
+ [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
44
+ [![Platform](https://img.shields.io/badge/platform-linux%20%7C%20macOS%20%7C%20windows-lightgrey)]()
45
+
46
+ `ipspoof` helps pentesters and bug bounty hunters quickly identify which HTTP header a web application trusts for client-IP-based access control, and which IP range bypasses the allowlist. Common in labs, CTFs, and real-world engagements where you see messages like:
47
+
48
+ ```
49
+ Your IP is not allowed to use this webservice. Only 10.10.10.x is allowed
50
+ <img width="1210" height="477" alt="resim" src="https://github.com/user-attachments/assets/b3868ae3-1499-401d-bb17-a171ddc822b3" />
51
+
52
+ ```
53
+ ![ipspoof demo](docs/images/1.jpeg)
54
+
55
+ ---
56
+
57
+ ## Features
58
+
59
+ - **Header discovery** — tests 100+ client-IP headers (`X-Forwarded-For`, `X-Real-IP`, `Forwarded`, `Client-IP`, `CF-Connecting-IP`, etc.) with a curated set of trusted IP values.
60
+ - **IP fuzzing** — once a working header is found, brute-forces the allowed IP range (e.g. `10.10.10.1-254`).
61
+ - **Smart anomaly detection** — catches bypasses by status change, size change, body hash, or body regex.
62
+ - **XFF chain variations** — `1.2.3.4, <ip>`, `<ip>, 1.2.3.4`, `for=<ip>`.
63
+ - **POST/PUT/PATCH support** — works against login forms and API endpoints.
64
+ - **Proxy rotation** — round-robin through a proxy list.
65
+ - **Tor support** — route through SOCKS5 with automatic identity rotation.
66
+ - **Rate limiting** — avoid bans during brute-force.
67
+ - **JSON output** — machine-readable results for reporting.
68
+ - **Interactive mode** — guided prompts for quick runs.
69
+ ![ipspoof Feature](docs/images/2.jpeg)
70
+ ---
71
+
72
+ ## Installation
73
+
74
+ ### pipx (recommended)
75
+
76
+ ```bash
77
+ pipx install ipspoof
78
+ ```
79
+
80
+ ### pip
81
+
82
+ ```bash
83
+ pip install ipspoof
84
+ ```
85
+
86
+ ### From source
87
+
88
+ ```bash
89
+ git clone https://github.com/Exript/ipspoof.git
90
+ cd ipspoof
91
+ pipx install .
92
+ ```
93
+
94
+ For Tor support:
95
+
96
+ ```bash
97
+ pipx install "ipspoof[tor]"
98
+ ```
99
+
100
+ ---
101
+
102
+ ## Usage
103
+
104
+ ### Basic
105
+
106
+ ```bash
107
+ ipspoof -u http://target/login.php --follow
108
+ ```
109
+
110
+ Output:
111
+
112
+ ![ipspoof Output](docs/images/3.jpeg)
113
+
114
+
115
+ ### Full pipeline (header discovery + IP fuzz)
116
+
117
+ ```bash
118
+ ipspoof -u http://target/login.php \
119
+ --phase2 --ip-pattern "10.10.10.{n}" --ip-range 1-254 \
120
+ --follow
121
+ ```
122
+
123
+ ### POST login attempt
124
+
125
+ ```bash
126
+ ipspoof -u http://target/login.php \
127
+ -X POST -d "username=admin&password=admin" \
128
+ --body-regex "dashboard|welcome" \
129
+ --follow
130
+ ```
131
+
132
+ ### Tor + periodic identity rotation
133
+
134
+ ```bash
135
+ ipspoof -u http://target/ --tor --tor-new-every 10
136
+ ```
137
+
138
+ ### Proxy list + rate limit
139
+
140
+ ```bash
141
+ ipspoof -u http://target/ --proxy-file proxies.txt --rate 30
142
+ ```
143
+
144
+ ### Interactive
145
+
146
+ ```bash
147
+ ipspoof -i
148
+ ```
149
+ Output:
150
+
151
+ ![ipspoof Output](docs/images/4.jpeg)
152
+
153
+ ---
154
+
155
+ ## Options
156
+
157
+ | Flag | Description |
158
+ |------|-------------|
159
+ | `-u, --url` | Target URL |
160
+ | `-i, --interactive` | Interactive mode |
161
+ | `-t, --threads` | Concurrent threads (default 30) |
162
+ | `--timeout` | Request timeout (default 8s) |
163
+ | `--follow` | Follow redirects |
164
+ | `-c, --cookie` | Cookie string |
165
+ | `-X, --method` | HTTP method (default GET) |
166
+ | `-d, --data` | Form data (for POST) |
167
+ | `--json` | JSON body (for POST) |
168
+ | `-H, --header` | Extra static header (repeatable) |
169
+ | `--proxy` | Single proxy |
170
+ | `--proxy-file` | Proxy list file |
171
+ | `--tor` | Route through Tor SOCKS5 |
172
+ | `--tor-new-every N` | Rotate Tor identity every N requests |
173
+ | `--rate N` | Max requests per second |
174
+ | `--body-regex` | Only treat body regex match as HIT |
175
+ | `--body-hash` | Treat hash change as HIT |
176
+ | `--size-tol` | Size tolerance (default 0.05) |
177
+ | `--chain` | Try XFF chain variations |
178
+ | `--ip` | IPs for Phase 1 (repeatable) |
179
+ | `--phase2` | Run IP fuzz phase |
180
+ | `--ip-pattern` | IP pattern (default `10.10.10.{n}`) |
181
+ | `--ip-range` | IP range (default `1-254`) |
182
+ | `-o, --output` | Save results as JSON |
183
+
184
+ ---
185
+
186
+ ## Tor setup (optional)
187
+
188
+ For `--tor-new-every`, add to `/etc/tor/torrc`:
189
+
190
+ ```
191
+ ControlPort 9051
192
+ CookieAuthentication 0
193
+ ```
194
+
195
+ Then:
196
+
197
+ ```bash
198
+ sudo systemctl restart tor
199
+ ```
200
+
201
+ Without this, `--tor` still works but `--tor-new-every` will only print a warning.
202
+
203
+ ---
204
+
205
+ ## How it works
206
+
207
+ 1. **Baseline** — sends a request with no spoof headers. Records status, size, and body hash of the "deny" response.
208
+ 2. **Phase 1** — for each (header, trusted IP) pair, sends a request and compares the response against baseline. Any response with a different status, size, hash, or regex match is flagged as a HIT.
209
+ 3. **Phase 2** — takes the working header(s) from Phase 1 and brute-forces the IP range you specify.
210
+
211
+ The tool never sends anything malicious — it only adds HTTP headers to ordinary requests.
212
+
213
+ ---
214
+
215
+ ## Legal
216
+
217
+ This tool is for **authorized security testing only**. Use it against:
218
+
219
+ - Systems you own
220
+ - Systems you have explicit written permission to test
221
+ - CTF/lab environments designed for testing
222
+
223
+ Unauthorized use against third-party systems is illegal in most jurisdictions. The author takes no responsibility for misuse.
224
+
225
+ ---
226
+
227
+ ## Contributing
228
+
229
+ PRs welcome. Please open an issue first for major changes.
230
+
231
+ ```bash
232
+ git clone https://github.com/Exript/ipspoof.git
233
+ cd ipspoof
234
+ pip install -e ".[dev]"
235
+ ```
236
+
237
+ ---
238
+
239
+ ## License
240
+
241
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,205 @@
1
+ # ipspoof
2
+
3
+ > HTTP header/IP allowlist bypass discovery tool for authorized security testing.
4
+
5
+ [![PyPI](https://img.shields.io/badge/pypi-v2.0.0-blue)](https://pypi.org/project/ipspoof/)
6
+ [![Python](https://img.shields.io/badge/python-3.8+-blue)](https://www.python.org/)
7
+ [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
8
+ [![Platform](https://img.shields.io/badge/platform-linux%20%7C%20macOS%20%7C%20windows-lightgrey)]()
9
+
10
+ `ipspoof` helps pentesters and bug bounty hunters quickly identify which HTTP header a web application trusts for client-IP-based access control, and which IP range bypasses the allowlist. Common in labs, CTFs, and real-world engagements where you see messages like:
11
+
12
+ ```
13
+ Your IP is not allowed to use this webservice. Only 10.10.10.x is allowed
14
+ <img width="1210" height="477" alt="resim" src="https://github.com/user-attachments/assets/b3868ae3-1499-401d-bb17-a171ddc822b3" />
15
+
16
+ ```
17
+ ![ipspoof demo](docs/images/1.jpeg)
18
+
19
+ ---
20
+
21
+ ## Features
22
+
23
+ - **Header discovery** — tests 100+ client-IP headers (`X-Forwarded-For`, `X-Real-IP`, `Forwarded`, `Client-IP`, `CF-Connecting-IP`, etc.) with a curated set of trusted IP values.
24
+ - **IP fuzzing** — once a working header is found, brute-forces the allowed IP range (e.g. `10.10.10.1-254`).
25
+ - **Smart anomaly detection** — catches bypasses by status change, size change, body hash, or body regex.
26
+ - **XFF chain variations** — `1.2.3.4, <ip>`, `<ip>, 1.2.3.4`, `for=<ip>`.
27
+ - **POST/PUT/PATCH support** — works against login forms and API endpoints.
28
+ - **Proxy rotation** — round-robin through a proxy list.
29
+ - **Tor support** — route through SOCKS5 with automatic identity rotation.
30
+ - **Rate limiting** — avoid bans during brute-force.
31
+ - **JSON output** — machine-readable results for reporting.
32
+ - **Interactive mode** — guided prompts for quick runs.
33
+ ![ipspoof Feature](docs/images/2.jpeg)
34
+ ---
35
+
36
+ ## Installation
37
+
38
+ ### pipx (recommended)
39
+
40
+ ```bash
41
+ pipx install ipspoof
42
+ ```
43
+
44
+ ### pip
45
+
46
+ ```bash
47
+ pip install ipspoof
48
+ ```
49
+
50
+ ### From source
51
+
52
+ ```bash
53
+ git clone https://github.com/Exript/ipspoof.git
54
+ cd ipspoof
55
+ pipx install .
56
+ ```
57
+
58
+ For Tor support:
59
+
60
+ ```bash
61
+ pipx install "ipspoof[tor]"
62
+ ```
63
+
64
+ ---
65
+
66
+ ## Usage
67
+
68
+ ### Basic
69
+
70
+ ```bash
71
+ ipspoof -u http://target/login.php --follow
72
+ ```
73
+
74
+ Output:
75
+
76
+ ![ipspoof Output](docs/images/3.jpeg)
77
+
78
+
79
+ ### Full pipeline (header discovery + IP fuzz)
80
+
81
+ ```bash
82
+ ipspoof -u http://target/login.php \
83
+ --phase2 --ip-pattern "10.10.10.{n}" --ip-range 1-254 \
84
+ --follow
85
+ ```
86
+
87
+ ### POST login attempt
88
+
89
+ ```bash
90
+ ipspoof -u http://target/login.php \
91
+ -X POST -d "username=admin&password=admin" \
92
+ --body-regex "dashboard|welcome" \
93
+ --follow
94
+ ```
95
+
96
+ ### Tor + periodic identity rotation
97
+
98
+ ```bash
99
+ ipspoof -u http://target/ --tor --tor-new-every 10
100
+ ```
101
+
102
+ ### Proxy list + rate limit
103
+
104
+ ```bash
105
+ ipspoof -u http://target/ --proxy-file proxies.txt --rate 30
106
+ ```
107
+
108
+ ### Interactive
109
+
110
+ ```bash
111
+ ipspoof -i
112
+ ```
113
+ Output:
114
+
115
+ ![ipspoof Output](docs/images/4.jpeg)
116
+
117
+ ---
118
+
119
+ ## Options
120
+
121
+ | Flag | Description |
122
+ |------|-------------|
123
+ | `-u, --url` | Target URL |
124
+ | `-i, --interactive` | Interactive mode |
125
+ | `-t, --threads` | Concurrent threads (default 30) |
126
+ | `--timeout` | Request timeout (default 8s) |
127
+ | `--follow` | Follow redirects |
128
+ | `-c, --cookie` | Cookie string |
129
+ | `-X, --method` | HTTP method (default GET) |
130
+ | `-d, --data` | Form data (for POST) |
131
+ | `--json` | JSON body (for POST) |
132
+ | `-H, --header` | Extra static header (repeatable) |
133
+ | `--proxy` | Single proxy |
134
+ | `--proxy-file` | Proxy list file |
135
+ | `--tor` | Route through Tor SOCKS5 |
136
+ | `--tor-new-every N` | Rotate Tor identity every N requests |
137
+ | `--rate N` | Max requests per second |
138
+ | `--body-regex` | Only treat body regex match as HIT |
139
+ | `--body-hash` | Treat hash change as HIT |
140
+ | `--size-tol` | Size tolerance (default 0.05) |
141
+ | `--chain` | Try XFF chain variations |
142
+ | `--ip` | IPs for Phase 1 (repeatable) |
143
+ | `--phase2` | Run IP fuzz phase |
144
+ | `--ip-pattern` | IP pattern (default `10.10.10.{n}`) |
145
+ | `--ip-range` | IP range (default `1-254`) |
146
+ | `-o, --output` | Save results as JSON |
147
+
148
+ ---
149
+
150
+ ## Tor setup (optional)
151
+
152
+ For `--tor-new-every`, add to `/etc/tor/torrc`:
153
+
154
+ ```
155
+ ControlPort 9051
156
+ CookieAuthentication 0
157
+ ```
158
+
159
+ Then:
160
+
161
+ ```bash
162
+ sudo systemctl restart tor
163
+ ```
164
+
165
+ Without this, `--tor` still works but `--tor-new-every` will only print a warning.
166
+
167
+ ---
168
+
169
+ ## How it works
170
+
171
+ 1. **Baseline** — sends a request with no spoof headers. Records status, size, and body hash of the "deny" response.
172
+ 2. **Phase 1** — for each (header, trusted IP) pair, sends a request and compares the response against baseline. Any response with a different status, size, hash, or regex match is flagged as a HIT.
173
+ 3. **Phase 2** — takes the working header(s) from Phase 1 and brute-forces the IP range you specify.
174
+
175
+ The tool never sends anything malicious — it only adds HTTP headers to ordinary requests.
176
+
177
+ ---
178
+
179
+ ## Legal
180
+
181
+ This tool is for **authorized security testing only**. Use it against:
182
+
183
+ - Systems you own
184
+ - Systems you have explicit written permission to test
185
+ - CTF/lab environments designed for testing
186
+
187
+ Unauthorized use against third-party systems is illegal in most jurisdictions. The author takes no responsibility for misuse.
188
+
189
+ ---
190
+
191
+ ## Contributing
192
+
193
+ PRs welcome. Please open an issue first for major changes.
194
+
195
+ ```bash
196
+ git clone https://github.com/Exript/ipspoof.git
197
+ cd ipspoof
198
+ pip install -e ".[dev]"
199
+ ```
200
+
201
+ ---
202
+
203
+ ## License
204
+
205
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,9 @@
1
+ """ipspoof — HTTP header/IP allowlist bypass discovery tool."""
2
+
3
+ __version__ = "2.0.0"
4
+ __author__ = "Exript (S. Engin ÖZLEM)"
5
+ __license__ = "MIT"
6
+
7
+ from .cli import main
8
+
9
+ __all__ = ["main", "__version__"]
@@ -0,0 +1,4 @@
1
+ from .cli import main
2
+
3
+ if __name__ == "__main__":
4
+ main()