Shodancli
This is a simple command-line interface (CLI) tool written in Rust, that allows users to fetch data related to IP addresses from the Shodan API.
Install / Use
/learn @malinkinsa/ShodancliREADME
Shodan CLI Tool
This is a simple command-line interface (CLI) tool written in Rust, that allows users to fetch data related to IP addresses from the Shodan API.
Requirements
For using
Shodan API key
For building
Rust programming language (version 1.51.0 or higher)
Usage
-
Download pre-built binary files from the "Releases" section. Depending on your system architecture, choose the appropriate file:
| File name | System | Architecture | Toolchain | |-------------------------------------------|-----------------------------------------------------|---------------------------|--------------------------------| | shodancli-aarch64-apple-darwin.tar.gz | macOS with Apple Silicon (M1/M2) processor | ARM64 | N/A | | shodancli-universal-apple-darwin.tar.gz | macOS with Intel/Silicon processor | Universal (x86_64, ARM64) | N/A | | shodancli-x86_64-apple-darwin.tar.gz | macOS with Intel x86_64 processor | x86_64 | N/A | | shodancli-x86_64-pc-windows-gnu.zip | Windows with x86_64 processor, using GNU toolchain | x86_64 | GNU toolchain | | shodancli-x86_64-pc-windows-msvc.zip | Windows with x86_64 processor, using MSVC toolchain | x86_64 | Microsoft Visual C++ toolchain | | shodancli-x86_64-unknown-linux-gnu.tar.gz | Linux with x86_64 processor, using GNU toolchain | x86_64 | GNU toolchain |
-
Set the SHODAN_API_KEY environment variable to your Shodan API key.
-
Run the tool with the command cargo run -- -t <TARGET_IP>.
-
You can specify multiple IP addresses separated by comma, like cargo run -- -t 127.0.0.1,8.8.8.8.
Build and run the Shodan CLI Tool:
-
Install Rust programming language: Link.
-
Clone this repository:
git clone git@github.com:malinkinsa/shodancli.git -
Set your Shodan API key as an environment variable by running the command export SHODAN_API_KEY=<your_api_key>.
-
Navigate to the project directory in your terminal.
-
Build the project by running the command:
cargo build --releaseThis will compile the Rust code and generate an executable binary file in the target/release directory.
-
Run the tool by executing the binary file with the command:
./target/release/shodancli -t <TARGET_IP>where <TARGET_IP> is the IP address(es) you want to check. You can specify multiple IP addresses separated by comma, like ./target/release/shodan-cli -t 127.0.0.1,8.8.8.8
Functionality
The tool uses the reqwest and serde libraries to fetch data from the Shodan API and deserialize it into Rust objects. It then displays the relevant information for the target IP address(es) in a formatted output. If the target is not found, displaying a message indicating no entries found. Dependencies
The tool has the following dependencies:
clap: used to parse command-line arguments
reqwest: used to make HTTP requests to the Shodan API
serde and serde_json: used to deserialize the API response into Rust objects
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
