Skip to main content

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.1 - 2026-07-04: Fixes
  • version 1.0 - 2026-06-28: First commit

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 >

Metadata

Release files for pyhttptracer 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyhttptracer 1.1
File Size Uploaded
pyhttptracer-1.1.tar.gz 14.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyhttptracer 1.1
File Interpreter ABI Platform
pyhttptracer-1.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.5 kB

Release files / pyhttptracer-1.1.tar.gz

Download URL pyhttptracer-1.1.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f14f3ec158cd30be2fe36aaeda55f97e96f3de2a0488a4f3054319abb953a798
BLAKE2b-256 checksum
How to use checksums
af9724d96418fef0feb3cea4d4511a851b2ffeab4c92037edee7cc30e65236f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / pyhttptracer-1.1-py3-none-any.whl

Download URL pyhttptracer-1.1-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
efc0e40b1b6a7729cfe4b8fd5ef85b31cbea534e3b332a00c7acc3699c48fc8c
BLAKE2b-256 checksum
How to use checksums
546fd6a7914d4f46892073db87dfa4c8d2a3e94378bd63cb185e317eb746c60d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page