Awesome Open Source
Awesome Open Source
Sponsorship

Duplicut βœ‚οΈ

Quickly dedupe massive wordlists, without changing the order tweet


travis build Mentioned in awesome-pentest

Created by nil0x42 and contributors


πŸ“– Overview

Modern password wordlist creation usually implies concatenating multiple data sources.

Ideally, most probable passwords should stand at start of the wordlist, so most common passwords are cracked instantly.

With existing dedupe tools you are forced to choose if you prefer to preserve the order OR handle massive wordlists.

Unfortunately, wordlist creation requires both:

So i wrote duplicut in highly optimized C to address this very specific need πŸ€“ πŸ’»


πŸ’‘ Quick start

git clone https://github.com/nil0x42/duplicut
cd duplicut/ && make
./duplicut wordlist.txt -o clean-wordlist.txt

πŸ”§ Options

  • Features:

    • Handle massive wordlists, even those whose size exceeds available RAM
    • Filter lines by max length (-l option)
    • Can remove lines containing non-printable ASCII chars (-p option)
    • Press any key to show program status at runtime.
  • Implementation:

    • Written in pure C code, designed to be fast
    • Compressed hashmap items on 64 bit platforms
    • Multithreading support
    • [TODO]: Use huge memory pages to increase performance
  • Limitations:

    • Any line longer than 255 chars is ignored
    • Heavily tested on Linux x64, mostly untested on other platforms.

πŸ“– Technical Details

πŸ”Έ 1- Memory optimized:

An uint64 is enough to index lines in hashmap, by packing size info within pointer's extra bits:

πŸ”Έ 2- Massive file handling:

If whole file can't fit in memory, it is split into virtual chunks, then each one is tested against next chunks.

So complexity is equal to th triangle number:

πŸ’‘ Throubleshotting

If you find a bug, or something doesn't work as expected, please compile duplicut in debug mode and post an issue with attached output:

# debug level can be from 1 to 4
make debug level=1
./duplicut [OPTIONS] 2>&1 | tee /tmp/duplicut-debug.log

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
c (13,982)Β 
password (133)Β 
cracking (32)Β 
wordlist (23)Β 
hashcat (15)Β 
password-cracking (15)Β 

Find Open Source By Browsing 7,000 Topics Across 59 Categories