A tool to follow URL redirects and analyze response codes
Project description
FollowLink
Overview
FollowLink is a Python-based command-line tool that allows you to follow and analyze URL redirects. It tracks the history of HTTP redirects, color-codes the HTTP status codes for easy identification, and calculates the total response time. This tool is useful for inspecting shortened URLs or URLs with multiple redirects.
Features
- Max Redirects: Specify the maximum number of redirects to follow.
- Timeout Control: Set timeout for each request to avoid long waits.
- Status Code Coloring:
- Green: 2xx (Success responses)
- Yellow: 3xx (Redirections)
- Red: 4xx (Client errors)
- Magenta: 5xx (Server errors)
- Detailed Redirect History: Displays each redirect step with status codes and URLs.
- Final URL & Time: Outputs the final destination URL and total response time.
How to Use
-
Clone the Repository:
git clone https://github.com/malwarekid/FollowLink.git && cd FollowLink
-
Run the Tool:
python3 followlink.py -u <URL> [-m <max_redirects>] [-t <timeout>]
Example:
python3 followlink.py -u https://bit.ly/3kF6Gk8 -m 10 -t 15
-
Command-Line Parameters:
-uor--url: The URL to follow (required).-mor--max_redirects: Maximum number of redirects (default: 5).-tor--timeout: Timeout for each request in seconds (default: 10).
Example Output
Redirect History:
1: 301 -> http://example.com/redirect1
2: 302 -> http://example.com/redirect2
3: 200 -> http://example.com/final
Total redirects: 3
Final URL: 200 -> http://example.com/final
Total Response Time: 2.34 seconds
Requirements
- Python 3.x
requestslibrarycoloramalibrary
Installation
Install the required dependencies:
pip install -r requirements.txt
Example
To use the tool:
python3 followlink.py -u https://bit.ly/3kF6Gk8 -m 10 -t 15
This will follow the redirects for the provided URL, display the status codes, final destination, and total response time.
Contributors
License
This project is licensed under the MIT License - see the LICENSE file for details.
Notes
Feel free to contribute, report issues, or provide feedback. Don't forget to follow Instagram me on GitHub. Happy URL Tracking!
Project details
Release history Release notifications | RSS feed
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 followlink-1.0.tar.gz.
File metadata
- Download URL: followlink-1.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
682d89943c968f937d4f7605b752a2e2d374d2510a148d51ef0d2959e3be175d
|
|
| MD5 |
338715e54d76012f557372fbff261056
|
|
| BLAKE2b-256 |
15fcd59a376c21098493b552762d48fa5465ffc540e85dbef11abdddcf6e71c4
|
File details
Details for the file followlink-1.0-py3-none-any.whl.
File metadata
- Download URL: followlink-1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf9088753cf1d780afe9dcc0978ad9691594fbb28784661bfea22b61b222f380
|
|
| MD5 |
2c49c17de4412f73d34a958e5b9f7d50
|
|
| BLAKE2b-256 |
88205ee4c14b7d522eeda248246dc0bb599a24a0b849f4aded2065f51bbd7f68
|