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

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

pyhttptracer-1.1.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyhttptracer-1.1-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file pyhttptracer-1.1.tar.gz.

File metadata

  • Download URL: pyhttptracer-1.1.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for pyhttptracer-1.1.tar.gz
Algorithm Hash digest
SHA256 f14f3ec158cd30be2fe36aaeda55f97e96f3de2a0488a4f3054319abb953a798
MD5 c58ecb9300b0e2b012c921693e4bd713
BLAKE2b-256 af9724d96418fef0feb3cea4d4511a851b2ffeab4c92037edee7cc30e65236f7

See more details on using hashes here.

File details

Details for the file pyhttptracer-1.1-py3-none-any.whl.

File metadata

  • Download URL: pyhttptracer-1.1-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

Hashes for pyhttptracer-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 efc0e40b1b6a7729cfe4b8fd5ef85b31cbea534e3b332a00c7acc3699c48fc8c
MD5 887fff39e8b84803032c7099c27076b4
BLAKE2b-256 546fd6a7914d4f46892073db87dfa4c8d2a3e94378bd63cb185e317eb746c60d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1 This release

2 files

1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page