pyhttptracer
Description
A simple Python script to trace HTTP redirects, by spoofing actual browsers with curl_cffi.
Usage
$ pip install pyhttptracer
$ pyhttptracer -h
usage: pyhttptracer [-h] [-i INPUT_FILE] [-o OUTPUT_FILE] [-n]
[-d {desktop_and_mobile,desktop,mobile}] [-p PROXY]
[-w MAX_WORKERS]
[URL]
optional arguments:
-h, --help show this help message and exit
Input parameters:
URL Single URL target given as a positional argument
-i INPUT_FILE, --input-file INPUT_FILE
Input file
Output parameters:
-o OUTPUT_FILE, --output-file OUTPUT_FILE
Output file (default "./traced_redirects.txt")
-n, --no-verbose Do not display the chain (default "False")
Connection parameters:
-d {desktop_and_mobile,desktop,mobile}, --device {desktop_and_mobile,desktop,mobile}
Device(s) to use: "desktop_and_mobile", "desktop",
"mobile" (default: "desktop_and_mobile")
-p PROXY, --proxy PROXY
Proxy configuration (e.g "-p 'http://127.0.0.1:8080',
use "socks5h" scheme to make the proxy resolve DNS
requests")
-w MAX_WORKERS, --max-workers MAX_WORKERS
Number of parallel workers (default 10)
Examples
$ pyhttptracer "https://httpbingo.org/absolute-redirect/6"
[+] "https://httpbingo.org/absolute-redirect/6" | desktop
302 | location header -> "https://httpbingo.org/absolute-redirect/5"
302 | location header -> "https://httpbingo.org/absolute-redirect/4"
302 | location header -> "https://httpbingo.org/absolute-redirect/3"
302 | location header -> "https://httpbingo.org/absolute-redirect/2"
302 | location header -> "https://httpbingo.org/absolute-redirect/1"
302 | location header -> "https://httpbingo.org/get"
200 | final -> "https://httpbingo.org/get"
[+] "https://httpbingo.org/absolute-redirect/6" | mobile
302 | location header -> "https://httpbingo.org/absolute-redirect/5"
302 | location header -> "https://httpbingo.org/absolute-redirect/4"
302 | location header -> "https://httpbingo.org/absolute-redirect/3"
302 | location header -> "https://httpbingo.org/absolute-redirect/2"
302 | location header -> "https://httpbingo.org/absolute-redirect/1"
302 | location header -> "https://httpbingo.org/get"
200 | final -> "https://httpbingo.org/get"
$ cat traced_redirects.txt
https://httpbingo.org/absolute-redirect/5
https://httpbingo.org/absolute-redirect/4
https://httpbingo.org/absolute-redirect/3
https://httpbingo.org/absolute-redirect/2
https://httpbingo.org/absolute-redirect/1
https://httpbingo.org/get
Changelog
- version 1.0 - 2026-06-28: First commit
Copyright and license
All trademarks, service marks, trade names and product names appearing on this repository are the property of their respective owners
pyhttptracer is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
pyhttptracer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU General Public License along with pyhttptracer. If not, see http://www.gnu.org/licenses/.
Contact
- Thomas Debize < tdebize at mail d0t com >
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyhttptracer-1.0.tar.gz.
File metadata
- Download URL: pyhttptracer-1.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cf239c572c0ebae813e8b1c24d810b60c0fb5d06c4547664d3e8ddcea546248
|
|
| MD5 |
d3fd105b32c8850b789ba01585ae7540
|
|
| BLAKE2b-256 |
a94839f8d9481559cb010220106e86e2a3b3b32b7494b89fcbc4c914e0f35527
|
File details
Details for the file pyhttptracer-1.0-py3-none-any.whl.
File metadata
- Download URL: pyhttptracer-1.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54f928f2df3a20b5033aa7c0311c101b3a0b88e7d060cca11d69fa8ffbe0fdec
|
|
| MD5 |
639704c69642bc67b54dfb6a641af6e6
|
|
| BLAKE2b-256 |
8a56a1577b6098da02f581b195fc6b86dd95fa31c56ddaf2b693e618f12dc838
|