Giter Club home page Giter Club logo

dedupe's Introduction

dedupe made-with-bash Maintenance Latest release Open Source Love svg1

dedupe is a URL deduplication tool that normalizes and deduplicates URLs based on hostname and query parameters. It offers options to filter URLs by query strings and exclude URLs with specific file extensions.

dedupe

Installation

curl -sSL https://raw.githubusercontent.com/0xPugal/dedupe/master/dedupe -o dedupe && chmod +x dedupe && sudo mv dedupe /usr/bin/

Features

  • Normalize and Deduplicate URLs: Based on hostname and sorted query parameter names.
  • Filter by Query Strings: Optionally include only URLs with query strings.
  • Exclude Specific Extensions: Remove URLs with specified file extensions.

Help/Options

Usage: dedupe [options] [<input_file>]
Options:
  -h, --help                    Usage/help info for dedupe
  -u, --urls <filename>         Filename containing URLs (use this if you don't pipe URLs via stdin)
  -V, --version                 Get current version for dedupe
  -qs, --query-strings-only     Only include URLs if they have query strings
  -ne, --no-extensions <ext>    Do not include URLs with specific extensions

Usage

  • cat urls.txt | dedupe -qs or dedupe -u urls.txt -qs to get only parameterized URLs
  • cat urls.txt | dedupe -ne css,png,js or dedupe -u urls.txt -ne css,png,js to remove URLs with these extensions
  • Chain with other tools echo example.com | gau | dedupe -qs -ne css,png,jpg,gif | anew output.txt

Before:

$ cat test.txt
https://test.com/api/users/123
https://test.com/api/users/222
https://test.com/api/users/412/profile
https://test.com/users/photos/photo.jpg
https://test.com/users/photos/myPhoto.jpg
https://demo.com/photo.png
https://google.com/home?qs=fuzz
https://google.com/home?qs=new&second=old
https://google.com/home?qs=asd&xyz=das
https://bing.com/test
https://bing.com/test.php?x=y&y=z

Only URLs with query strings:

$ ./dedupe -u test.txt -qs
https://google.com/home?qs=fuzz
https://google.com/home?qs=new&second=old
https://google.com/home?qs=asd&xyz=das
https://bing.com/test.php?x=y&y=z

Remove URLs with certain extensions:

$ ./dedupe -u test.txt -ne jpg,png,gif
https://test.com/api/users/123
https://test.com/api/users/222
https://test.com/api/users/412/profile
https://google.com/home?qs=fuzz
https://google.com/home?qs=new&second=old
https://google.com/home?qs=asd&xyz=das
https://bing.com/test
https://bing.com/test.php?x=y&y=z

Similar Tools

dedupe's People

Contributors

0xpugal avatar

Stargazers

Eyezik avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.