Files
CrowsNest/README.md
T

5.4 KiB

Dehasher

A cli tool built for interaction with the Dehash API

Ar1ste1a

Features

  • Output Format Control
  • Request Limiting
  • Record Limiting
  • Regular Expression Handling
  • Exact Match Handling
  • Error Handling
  • Credential Dumping
  • Intelligent Token Usage
  • Database Path Configuration

Options

usage: Dehasher [-h --help] {-k --key}  {-a --authorized-email} [-h --help]  [-m --max-records]  [-r --max-requests]  [-B --print-balance]  [-X --exact-match]  [-R --regex-match]  [-t --list-tokens]  [-o --output-file-name]  [-T --output-txt]  [-J --output-json]  [-Y --output-yaml]  [-x --output-xml]  [-U --username-query]  [-E --email-query]  [-I --ip-address-query]  [-P --password-query]  [-Q --hashed-password-query]  [-N --name-query]  [-C --creds-only]

Dehashed Tool

options:
   -h --help                                      show this help message and exit
   -m --max-records                           Maximum amount of records to return
   -r --max-requests                           Maximum number of requests to make
   -B --print-balance                      Print remaining balance after requests
   -X --exact-match                                  Use Exact Matching on fields
   -R --regex-match                                  Use Regex Matching on fields
   -t --list-tokens                           List the number of tokens remaining
   -o --output-file-name                                File to output results to
   -T --output-txt                                            Output to text file
   -J --output-json                                           Output to JSON file
   -Y --output-yaml                                           Output to YAML file
   -x --output-xml                                             Output to XML file
   -U --username-query                                             Username Query
   -E --email-query                                                   Email Query
   -I --ip-address-query                                         IP Address Query
   -P --password-query                                             Password Query
   -Q --hashed-password-query                               Hashed Password Query
   -N --name-query                                                     Name Query
   -C --creds-only                                        Return Credentials Only
   -k --key                                                               API Key
   -a --authorized-email                Email to pair with key for authentication
   --local-db                           Use local database in current directory


v1.0

Sample Run

-k ddq<redacted> -a ar1ste1a@<redacted> -E @example.com -C -o example_creds
Making 3 Requests for 10000 Records (30000 Total)
        [*] Performing Request...
        [*] Retrieved 60 Records
[-] Not Enough Entries, ending queries
[+] Discovered 60 Records
        [*] Writing entries file: example_creds.json
                [*] Success

Getting Started

To begin, clone the repository

git clone https://github.com/Ar1ste1a/Dehasher.git
cd Dehasher
go build dehasher.go

Database Configuration

Dehasher supports two database storage options:

  1. Default Path (default): Stores the database at ~/.local/share/Dehasher/db/dehashed.sqlite
  2. Local Path: Stores the database in the current directory as ./dehasher.sqlite

To configure the database location:

# Use local database in current directory
./dehasher set-local-db true

# Use default database path
./dehasher set-local-db false

You can also specify the database location when running commands:

# Use local database for this command only
./dehasher -k YOUR_API_KEY -a YOUR_EMAIL -E @example.com --local-db

Crafting a query

Simple Query

# Provide credentials for emails matching @target.com
dehasher -k ddq<redacted> -a ar1ste1a@domain.tld -E @target.com

Simple Credentials Query

# Provide credentials for emails matching @target.com
dehasher -k ddq<redacted> -a ar1ste1a@domain.tld -E @target.com -C

Simple Query Returning Balance

# Provide credentials for emails matching @target.com
dehasher -k ddq<redacted> -a ar1ste1a@domain.tld -E @target.com -C -B

Regex Query

# Return matches for emails matching this given regex query
# -R e: Specify the '-E' field as a regex entry
dehasher -k ddq<redacted> -a ar1ste1a@domain.tld -E '[a-zA-Z0-9]+(?:\.[a-zA-Z0-9]+)?@target.com' -C -B -R e

Exact Match Query

# Return matches for usernames exactly matching "admin"
# -X u: Specify the '-U' field as an exact match entry
dehasher -k ddq<redacted> -a ar1ste1a@domain.tld -C -B -U admin -X u

Output Text (default JSON)

# Return matches for usernames exactly matching "admin" and write to text file 'admins_file.txt'
dehasher -k ddq<redacted> -a ar1ste1a@domain.tld -C -B -U admin -X u -T -o admins_file

Output YAML

# Return matches for usernames exactly matching "admin" and write to yaml file 'admins_file.yaml'
dehasher -k ddq<redacted> -a ar1ste1a@domain.tld -C -B -U admin -X u -Y -o admins_file

Output XML

# Return matches for usernames exactly matching "admin" and write to xml file 'admins_file.xml'
dehasher -k ddq<redacted> -a ar1ste1a@domain.tld -C -B -U admin -X u -x -o admins_file