diff --git a/.img/crowsnest.png b/.img/crowsnest.png new file mode 100644 index 0000000..ff0b416 Binary files /dev/null and b/.img/crowsnest.png differ diff --git a/README.md b/README.md index 50dd60d..2b7f65b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -# 🚀 Dehasher +
+ Ar1ste1a +
+ ### A CLI tool for seamless interaction with the Dehashed API --- @@ -19,43 +22,32 @@ --- -## 📦 Installation - -Clone the repository and build the tool: -```bash -git clone https://github.com/Ar1ste1a/Dehasher.git -cd Dehasher -go build dehasher.go -``` - -
- ## 🔰 Getting Started To begin, clone the repository ``` bash-session -git clone https://github.com/Ar1ste1a/Dehasher.git -cd Dehasher -go build dehasher.go +git clone https://github.com/Ar1ste1a/CrowsNest.git +cd crowsnest +go build crowsnest.go ``` -
+--- ## 🛠️ Initial Setup -Dehasher requires an API key from Dehashed. Set it up with: +CrowsNest requires an API key from Dehashed. Set it up with: ```bash -ar1ste1a@kali:~$ dehasher set-key +ar1ste1a@kali:~$ crowsnest set-dehashed ``` -
+--- ## 🗄️ Database Configuration -Dehasher supports two database storage options: +CrowsNest 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` +1. **Default Path** (default): Stores the database at `~/.local/share/crowsnest/db/dehashed.sqlite` +2. **Local Path**: Stores the database in the current directory as `./crowsnest.sqlite` The **Local Path** option allows for separate databases for different projects or engagements. @@ -63,47 +55,47 @@ To configure the database location: ```bash # Use local database in current directory -./dehasher set-local-db true +./crowsnest set-local-db true # Use default database path -./dehasher set-local-db false +./crowsnest set-local-db false ``` -
+--- ## 🔍 Crafting Queries ### Simple Query -Dehasher can be used simply for example to query for credentials matching a given email domain. +CrowsNest can be used simply for example to query for credentials matching a given email domain. ``` go # Provide credentials for domains matching target.com -dehasher api -D target.com -C +crowsnest api -D target.com -C ``` ### Simple Credentials Query -Dehasher can also be used to return only credentials for a given query. +CrowsNest can also be used to return only credentials for a given query. ``` go # Provide credentials for emails matching @target.com -dehasher api -E @target.com -C +crowsnest api -E @target.com -C ``` ### Multiple Match Query -Dehasher is capable of handling multiple queries for the same field. +CrowsNest is capable of handling multiple queries for the same field. This is useful for when you want to search for multiple domains, or multiple usernames. ``` go # Provide credentials for domains matching target.com and target2.com, retrieving only credentials -dehasher api -D target.com,target2.com -C +crowsnest api -D target.com,target2.com -C ``` ### Wildcard Query -Dehasher is capable of handling wildcard queries. +CrowsNest is capable of handling wildcard queries. A wildcard query cannot begin with a wildcard. This is a limitation of the Dehashed API. An asterisk can be used to denote multiple characters, and a question mark can be used to denote a single character. ![Alt text](.img/wildcard_sample.png "Wildcard Query") ``` go # Provide credentials for emails matching @target.com and @target2.com -dehasher api -E @target?.com -C -W +crowsnest api -E @target?.com -C -W ``` ### Email Query @@ -112,47 +104,47 @@ Dehashed has dictated that emails should be searched in the following format: As such, to query an email, please use the following format (note, wildcard is not required but can be useful): ``` go # Provide credentials for emails matching target.*@target.com -dehasher api -W -E 'target*' -D target.com +crowsnest api -W -E 'target*' -D target.com ``` You may also query the domain and find emails as well ``` go # Provide credentials for emails matching target.com -dehasher api -D target.com -C +crowsnest api -D target.com -C ``` ### Regex Query -Dehasher is capable of handling regex queries. +CrowsNest is capable of handling regex queries. Simply denote regex queries with the `-R` flag. Place all regex queries in quotes with the corresponding query flag in single quotes. ``` go # Return matches for emails matching this given regex query -dehasher api -R -E '[a-zA-Z0-9]+(?:\.[a-zA-Z0-9]+)?@target.com' +crowsnest api -R -E '[a-zA-Z0-9]+(?:\.[a-zA-Z0-9]+)?@target.com' ``` ### Output Text (default JSON) -Dehasher is capable of handling output formats. +CrowsNest is capable of handling output formats. The default output format is JSON. To change the output format, use the `-f` flag. -Dehasher currently supports JSON, YAML, XML, and TEXT output formats. +CrowsNest currently supports JSON, YAML, XML, and TEXT output formats. ``` go # Return matches for usernames exactly matching "admin" and write to text file 'admins_file.txt' -dehasher api -U admin -o admins_file -f txt +crowsnest api -U admin -o admins_file -f txt ``` --- ## 🌐 WhoIs Lookups -Dehasher supports WHOIS lookups, history searches, reverse WHOIS searches, IP lookups, MX lookups, NS lookups, and subdomain scans. +CrowsNest supports WHOIS lookups, history searches, reverse WHOIS searches, IP lookups, MX lookups, NS lookups, and subdomain scans. The WhoIs Lookups require a separate API Credit from the Dehashed API. ### Domain Lookup -Dehasher can perform a domain lookup for a given domain. +CrowsNest can perform a domain lookup for a given domain. This provides a tree view of the domain's WHOIS information. ![Alt text](.img/tree_whois_lookup.png "WhoIs Tree View") ```bash # Perform a WHOIS lookup for example.com -dehasher whois -d example.com +crowsnest whois -d example.com ``` ### History Lookup @@ -161,122 +153,122 @@ This is a Dehashed API limitation. The history lookup is immediately written to file and not displayed in the terminal or stored in the database. ```bash # Perform a WHOIS history search for example.com -dehasher whois -d example.com -H +crowsnest whois -d example.com -H ``` ### Reverse WHOIS Lookup -Dehasher can perform a reverse WHOIS lookup for given criteria. +CrowsNest can perform a reverse WHOIS lookup for given criteria. This provides a list of all domains that match the given query. The reverse WHOIS lookup is immediately written to file and not displayed in the terminal or stored in the database. ```bash # Perform a reverse WHOIS lookup for example.com -dehasher whois -I example.com +crowsnest whois -I example.com ``` ### IP Lookup -Dehasher can perform a reverse IP lookup for a given IP address. +CrowsNest can perform a reverse IP lookup for a given IP address. This provides a list of all domains that match the given query. ![Alt text](.img/reverse_ip_lookup.png "WhoIs Tree View") ```bash # Perform a reverse IP lookup for 8.8.8.8 -dehasher whois -i 8.8.8.8 +crowsnest whois -i 8.8.8.8 ``` ### MX Lookup -Dehasher can perform an MX lookup for a given MX hostname. +CrowsNest can perform an MX lookup for a given MX hostname. This provides a list of all domains that match the given query. ![Alt text](.img/mx_lookup.png "WhoIs Tree View") ```bash # Perform a reverse MX lookup for google.com -dehasher whois -m google.com +crowsnest whois -m google.com ``` ### NS Lookup -Dehasher can perform an NS lookup for a given NS hostname. +CrowsNest can perform an NS lookup for a given NS hostname. This provides a list of all domains that match the given query. The picture below also includes the --debug global flag. ![Alt text](.img/debug_ns_search.png "WhoIs Tree View") ```bash # Perform a reverse NS lookup for google.com -dehasher whois -n google.com +crowsnest whois -n google.com ``` ### Subdomain Scan -Dehasher can perform a subdomain scan for a given domain. +CrowsNest can perform a subdomain scan for a given domain. This provides a list of all subdomains that match the given query. ![Alt text](.img/subdomains_lookup.png "WhoIs Tree View") ```bash # Perform a WHOIS subdomain scan for google.com -dehasher whois -d google.com -s +crowsnest whois -d google.com -s ``` --- ## 🌐 Hunter.io -Dehasher supports Hunter.io lookups. +CrowsNest supports Hunter.io lookups. Hunter.io lookups require a separate API Key from the Dehashed API. This can be set using the `set-hunter` command. ```bash # Set the Hunter.io API key -dehasher set-hunter +crowsnest set-hunter ``` ### Domain Search -Dehasher can perform a domain search for a given domain. +CrowsNest can perform a domain search for a given domain. This provides information about company including a description, social media information and any technologies in use. ![Alt text](.img/hunter_domain_search.png "Hunter.io Domain Search") ```bash # Perform a Hunter.io domain search for example.com -dehasher hunter -d example.com -D +crowsnest hunter -d example.com -D ``` ### Email Finder -Dehasher can perform an email finder search for a given domain, first name, and last name. +CrowsNest can perform an email finder search for a given domain, first name, and last name. This provides information about a user including a confidence score, and any social media accounts linked to a first name, last name and email. ![Alt text](.img/hunter_email_finder.png "Hunter.io Email Finder") ```bash # Perform a Hunter.io email finder search for example.com -dehasher hunter -d example.com -F John -L Doe -E +crowsnest hunter -d example.com -F John -L Doe -E ``` ### Email Verification -Dehasher can perform an email verification search for a given email. +CrowsNest can perform an email verification search for a given email. This provides a verification and score of a given email address. ![Alt text](.img/email_verification.png "Hunter.io Email Verification") ```bash # Perform a Hunter.io email verification search for example@target.com -dehasher hunter -e example@target.com -V +crowsnest hunter -e example@target.com -V ``` ### Company Enrichment -Dehasher can perform a company enrichment search for a given domain. +CrowsNest can perform a company enrichment search for a given domain. This provides information about a company given its domain. ![Alt text](.img/company_enrichment.png "Hunter.io Company Enrichment") ```bash # Perform a Hunter.io company enrichment search for example.com -dehasher hunter -d example.com -C +crowsnest hunter -d example.com -C ``` ### Person Enrichment -Dehasher can perform a person enrichment search for a given email. +CrowsNest can perform a person enrichment search for a given email. This provides information about a user given an email address.. ![Alt text](.img/person_enrichment.png "Hunter.io Person Enrichment") ```bash # Perform a Hunter.io person enrichment search for example@target.com -dehasher hunter -e example@target.com -P +crowsnest hunter -e example@target.com -P ``` ### Combined Enrichment -Dehasher can perform a combined enrichment search for a given email. +CrowsNest can perform a combined enrichment search for a given email. This is a combination of the company and person enrichments given an email address. ![Alt text](.img/combined_enrichment_1.png "Hunter.io Combined Enrichment") ![Alt text](.img/combined_enrichment_2.png "Hunter.io Combined Enrichment") ```bash # Perform a Hunter.io combined enrichment search for example@target.com -dehasher hunter -e example@target.com -B +crowsnest hunter -e example@target.com -B ``` --- ## 📊 Database Querying -Dehasher stores query results in a local database. +CrowsNest stores query results in a local database. This database can be queried for previous results. This is useful for when you want to query for specific information. This database also includes WhoIs Information and Subdomain Scan results, but does **not** include historical lookups. @@ -291,32 +283,32 @@ This database also includes WhoIs Information and Subdomain Scan results, but do ```bash # Query the database for all results containing the word 'admin' in the username -dehasher query -t results -q "username LIKE '%admin%'" +crowsnest query -t results -q "username LIKE '%admin%'" ``` ## Raw SQL Queries ![Alt text](.img/raw_query_db.png "Raw Query") -Dehasher also supports raw SQL queries. This is useful for when you want to query for specific information. +CrowsNest also supports raw SQL queries. This is useful for when you want to query for specific information. ```bash # Query the database for all results containing the word 'admin' in the username -dehasher query -r "SELECT * FROM results WHERE username LIKE '%admin%'" +crowsnest query -r "SELECT * FROM results WHERE username LIKE '%admin%'" ``` ## Query Options -Dehasher supports a number of query options. These options can be used to filter the results of a query. +CrowsNest supports a number of query options. These options can be used to filter the results of a query. ```bash # Query the database for all results containing the word 'admin' in the username -dehasher query -t results -q "username LIKE '%admin%'" -n username,email,password +crowsnest query -t results -q "username LIKE '%admin%'" -n username,email,password ``` ## Listing Tables and Columns -Dehasher supports listing all available tables and columns. +CrowsNest supports listing all available tables and columns. This is useful for when you want to query for specific information. ```bash # List all available tables and columns -dehasher query -a +crowsnest query -a ``` The current tables available for query are: @@ -340,22 +332,22 @@ The current tables available for query are: --- # Exporting Results -Dehasher supports exporting results to a file. +CrowsNest supports exporting results to a file. This is useful for when you want to requery for specific information without touching the Dehashed API. The export subcommand supports all the same options as the query subcommand. The export subcommand also supports file naming and output format control. ```bash # Export all results containing the word 'admin' in the username to a text file -dehasher export -t results -q "username LIKE '%admin%'" -o admins_file -f txt +crowsnest export -t results -q "username LIKE '%admin%'" -o admins_file -f txt ``` ## 🐛 Debugging -Dehasher uses the `zap` logging library for logging. The logs are stored in `~/.local/share/Dehasher/logs`. -The logs can be easily queried from the Dehasher CLI. +CrowsNest uses the `zap` logging library for logging. The logs are stored in `~/.local/share/crowsnest/logs`. +The logs can be easily queried from the crowsnest CLI. ### Logs Dates -#### Dehasher utilized 'easy time' to determine the appropriate time for a given query. +#### crowsnest utilized 'easy time' to determine the appropriate time for a given query. ![Alt text](.img/easy_time_parsing.png "Easy Time") #### You may also used dates mixed with easy time to perform queries. ![Alt text](.img/mixed_time_query.png "Mixed Time") @@ -373,18 +365,18 @@ The logs can be easily queried from the Dehasher CLI. ```bash # Show the last 10 logs -dehasher logs -l 10 +crowsnest logs -l 10 # Show logs from the last 24 hours -dehasher logs -s "last 24 hours" +crowsnest logs -s "last 24 hours" # Show logs from the last 24 hours with a severity of error or fatal -dehasher logs -s "05-01-2025" -v error,fatal +crowsnest logs -s "05-01-2025" -v error,fatal ``` ## 🎉 Sample Run ```bash -ar1ste1a@kali:~$ dehasher api -D .com -o -f json +ar1ste1a@kali:~$ crowsnest api -D .com -o -f json Making 3 Requests for 10000 Records (30000 Total) [*] Querying Dehashed API... [*] Performing Request... @@ -397,7 +389,7 @@ Making 3 Requests for 10000 Records (30000 Total) ``` ## 🤝 Contributing -Contributions are welcome! Submit a pull request to help improve Dehasher. +Contributions are welcome! Submit a pull request to help improve CrowsNest.