Skip to content

shodan-hash

Everyone

The shodan-hash is a command-line to calculate simple hashes of a website, favicon, local file or text. It can be used freely without a Shodan account.

Installation

Grab the latest binary for your operating system.

Usage

Terminal window
$ shodan-hash <COMMAND> <OPTIONS>
Calculate the favicon hash of a local file, hostname or URL
Usage: shodan-hash <COMMAND>
Commands:
url Calculate hashes of an URL
file Calculate the hash of a local file or a favicon
text Calculate the hash of a string
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version

url

Calculate hash of an URL or hostname. Schema and port are optional (default to https and 443).

Usage: shodan-hash url <URL>
Arguments:
<URL> Web page URL
Options:
-h, --help Print help

Due to limitations not all hashes are available.

HashAvailability
http.dom_hash
http.favicon.hash
http.headers_hash
http.html_hash
http.server_hash
http.title_hash
SSL hashes

Example:

Terminal window
$ shodan-hash url google.com
Requesting https://google.com/
Requesting https://www.google.com/
google.com
hash: 37619786
http.favicon.hash: 708578229
http.headers_hash: 1465093010
http.html_hash: 2026802952
http.server_hash: 1939508423
http.title: "301 Moved"
http.title_hash: -410180139
https://www.google.com/
hash: 989933317
http.favicon.hash: 708578229
http.headers_hash: -851755872
http.html_hash: -1311116960
http.server_hash: 1939508423
http.title: "Google"
http.title_hash: -573771547

file

Calculate the hash of a local file or a local favicon. The favicon's hash is calculated differently, so if you want to hash a file as a favicon, make sure to add the --favicon (or -f) option.

Usage: shodan-hash file [OPTIONS] <FILE_PATH>
Arguments:
<FILE_PATH> Local file path
Options:
-f, --favicon Treat file as favicon
-h, --help Print help

Example:

Terminal window
$ shodan-hash file google.ico
google.ico
hash: -1846423585
$ shodan-hash file --favicon google.ico
google.ico
http.favicon.hash: 708578229

text

Calculate the hash of a string.

Usage: shodan-hash text <TEXT>
Arguments:
<TEXT>
Options:
-h, --help Print help

Example:

Terminal window
$ shodan-hash text shodan
hash: 1201100143