OSINTverse

otinstaller · Networks and hosts

Install Shodan CLI on Windows, macOS, or Linux in one command

The official command-line client for Shodan, the search engine for internet-connected devices. It shows a host's open ports, banners and known vulnerabilities from Shodan's own scans, so you send the host no traffic yourself. It needs a Shodan API key.

Shodan CLI in three lines

curl -fsSL https://otinstaller.com/install.sh | sh
ot install shodan
ot run shodan init YOUR_API_KEY

On Windows, replace the first line with irm https://otinstaller.com/install.ps1 | iex in PowerShell.

Runs achillean/shodan-python (MIT, ★ 3.5k, otinstaller 0.3.0). otinstaller installs it as a Python package, pinned to version 1.31.0; it does not change or audit the tool itself.

What Shodan CLI is for

  • The open ports, banners, and known vulnerabilities of a host, from Shodan's scans.
  • Finding every host that runs a product or sits in a network.
  • Reading a domain's DNS entries as Shodan has seen them.

Run Shodan CLI with ot

ot run shodan passes everything after the tool's name to Shodan CLI unchanged, with input and output passed through, so the project's own documentation applies and tools pipe into each other.

Save your API key, once.
ot run shodan init YOUR_API_KEY
Show what Shodan has recorded for an address.
ot run shodan host 8.8.8.8
List the DNS records and subdomains Shodan knows.
ot run shodan domain example.com
Search with a Shodan query.
ot run shodan search --fields ip_str,port,org "product:nginx country:DE"

Where the results go

ot run saves nothing itself: Shodan CLI's output goes to your terminal, a pipe, or wherever its own output option writes it. Results can hold personal data, so store and share them accordingly.

Before you run it

  • Run ot run shodan init <your key> once before use.
  • Searches and some filters count against your Shodan plan.

Update, remove, inspect

ot info shodan              # details, and how it installs on this system
ot update shodan            # move to the version the registry pins
ot update shodan --latest   # take the newest upstream release instead
ot remove shodan            # remove it

Full reference: the otinstaller docs, Shodan CLI on otinstaller.com, and the tool's own project page.

Pairs with

The official command-line client for Censys, a search engine that continuously scans the internet and indexes hosts and certificates.
uncover sends one query to several host search engines, including Shodan, Censys and FOFA, and prints the matching addresses.
The official command-line client for IPinfo.

When open-source isn't enough

The Shodan client needs a key and plan of your own. SearchIn runs Shodan host lookups per search from one wallet, next to its other providers.

Host intelligence

FAQ

Shodan CLI with otinstaller, answered

How do I install Shodan CLI on Windows, macOS, or Linux?

Install ot once with the one-line script on the otinstaller page, then run ot install shodan. Ot puts it in a Python environment of its own under ~/.ot/uv, apart from your system Python, at version 1.31.0. ot itself needs no administrator rights, and ot doctor checks that every installed tool starts.

How do I run Shodan CLI through ot?

With ot run shodan followed by Shodan CLI's own arguments, for example: ot run shodan init YOUR_API_KEY. ot passes everything after the tool's name straight through and exits with the tool's exit code, so the project's own documentation applies unchanged. Add ~/.ot/bin to your PATH to call the tool by its own name.

Is Shodan CLI part of ot scan?

No. ot scan takes a username, an email address, a domain, or a phone number and runs the tools the registry assigns to that kind of target. Run Shodan CLI on its own with ot run shodan.

Does Shodan CLI need an API key or a login?

ot stores no key for it. Run ot run shodan init <your key> once before use.

Does Shodan CLI send traffic to the target?

The registry lists Shodan CLI as passive: it does not probe the target's own systems. Options that do contact the target, where the tool has them, are named under "Before you run it".