Skip to main content

A tool to filter and deduplicate URLs based on domain and query parameters.

Project description

Url's - Filter by - Parameters

urlF.py is a Python script designed to remove duplicate URLs based on both the base URL (including path) and their query parameters. The script processes a list of URLs from an input file, filters out duplicates based on their query parameters, and writes the unique URLs to an output file.


🚀 Installation

You can install urlF.py using GitHub or PyPI.

Option 1: Install from GitHub

Step 1: Clone the Repository

git clone https://github.com/Boopath1/urlF.py

or

git clone --depth 1 https://github.com/Boopath1/urlF.py

Install the required dependencies:

Step 2

pip3 install -r requirements.txt  # or pip install -r requirements.txt

Option 2: Install from PyPI

Step 1: Install via pip

pip install urlf  # Standard installation

Alternative: If Facing System Restrictions

pip install urlf --break-system-packages  # For some restricted environments

Usage

Step 1

python3 -m urlf <input_file> <output_file>
  • <input_file>: Path to the input file containing the list of URLs.
  • <output_file>: Path to the output file where unique URLs will be written.

Basic usage:

Step 2

python3 urlF.py duplicate-params.txt filtered_urls.txt

urlF.py: The main script file. It processes URLs from an input file, removes duplicates based on query parameters, and writes the results to an output file.

Example

The input file duplicate-params.txt might look like this:

https://example.com/page?fileGuid=DPg868kv89HJtQ8q
https://example.com/page?fileGuid=DPg868kv89HJtQ8q&anotherParam=123
https://example.com/page?anotherParam=123
https://example.com/page?fileGuid=aAqwe868kv89HJtQ8q
https://example.com/page?fileGuid=DPg868kv89HJtQ8q&extraParam=xyz
https://example.com/page?extraParam=xyz
https://example.com/page?extraParam=xyz_Aqw
https://example.com/page?fileGuid=DifferentGuid

The output file filtered_urls.txt will contain:

https://example.com/page?fileGuid=DPg868kv89HJtQ8q
https://example.com/page?fileGuid=DPg868kv89HJtQ8q&anotherParam=123
https://example.com/page?anotherParam=123
https://example.com/page?fileGuid=DPg868kv89HJtQ8q&extraParam=xyz
https://example.com/page?extraParam=xyz

📊 Comparison with Other Tools

Tool Functionality Limitation
sort Orders URLs alphabetically Does not filter based on query parameters
urldedupe Removes exact duplicate URLs Cannot analyze query parameter uniqueness
uro Normalizes and deduplicates URLs Does not focus on parameter-based filtering
urlF.py Filter URLs based on both the base URL (including path) and their query parameters Provides better query-based filtering and cleanup

Sample POC

The timing is also mentioned on the right side. You can verify that this script takes little time compared to other tools.

image

🔹 Why Run This After paramspider?

  • When running paramspider, you’ll often get duplicate parameters.
  • Instead of scanning the same parameter multiple times, use urlF.py to filter results efficiently.

image

image

  • Almost 2K URLs 😱

💡 Contributing

Contributions are welcome! If you have suggestions or feature improvements, feel free to:

  • Fork the repository and create a pull request.
  • Open an issue if you encounter any bugs.

🎯 Final Thoughts

  • After enumerating all the URLs using tools like waybackurls, gau, katana, and others, use urlF.py to get unique URLs along with their parameters.
  • This ensures efficient filtering, reduces redundant requests, and helps in better targeted testing.
  • Optimized for security researchers and penetration testers to streamline the URL analysis process.

Happy Hacking! 🎯 🚀

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

urlf-2.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

urlf-2.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file urlf-2.0.tar.gz.

File metadata

  • Download URL: urlf-2.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for urlf-2.0.tar.gz
Algorithm Hash digest
SHA256 4a9d96c72943d905d86f55c5dcba3ef3f95d1d036342b60c56e8c903fb1ef142
MD5 e337f59da00718b5068c463f8fd87790
BLAKE2b-256 4cf8cec3c4ab1f41a1df876f37c4b3bf5dbec2b6962ff6ce90314e5dcb4c85b4

See more details on using hashes here.

File details

Details for the file urlf-2.0-py3-none-any.whl.

File metadata

  • Download URL: urlf-2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for urlf-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e639645d5e6617324f6299f98a4d1c159f64cabf308b7eab1120aab73f5da77
MD5 d2a901ded5e67b1fb49e0d9186e296b7
BLAKE2b-256 92ab8db4962071b50e621eb43cb8f417aff1e25e14eebd38d60179cec34c8cb3

See more details on using hashes here.

Supported by

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