Skip to content

ret2src/shodancli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shodancli

shodancli is an extensible Python command-line client for the Shodan API.

Currently, it supports the explore command for discovering exposed systems across individual IPv4 addresses and ranges.

Installation

shodancli can be installed using a Python package manager of your choice. Below are some popular options — we recommend using either pipx or uv.

pipx

pipx install "git+https://github.com/ret2src/shodancli.git"

uv

uv tool install "git+https://github.com/ret2src/shodancli.git"

pip

python3 -m pip install "git+https://github.com/ret2src/shodancli.git"

Local Development Install

python3 -m venv .venv
.venv/bin/pip install -e .

Usage

Set your Shodan API key:

export SHODAN_API_KEY=your_key_here

Show top-level help:

shodancli --help

Show command help:

shodancli explore --help

"Explore" Command

shodancli explore currently supports:

  • Individual public IPv4 addresses such as 1.1.1.1
  • Public CIDR ranges such as 8.8.8.0/24
  • Public dash ranges such as 8.8.8.8-8.8.8.15
  • Public shorthand dash ranges such as 8.8.8.8-15

Non-public IPv4 addresses and ranges are rejected during input validation and reported as warnings.

The output includes:

  • Discovered IPs (and hostnames if available)
  • Discovered Ports (per range and overall)
  • System counts (per range and overall)

Explore IPv4 ranges with inline inputs:

shodancli explore --ranges "1.1.1.1, 8.8.8.0/24, 8.8.8.8-8.8.8.15, 60.12.212.75-79"

Explore IPv4 ranges from a line-separated input file:

shodancli explore --file ranges.txt

Explore IPv4 ranges from STDIN:

cat ranges.txt | shodancli explore

About

Quickly explore network ranges using your Shodan API key 🔭

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages