2 stable releases
Uses new Rust 2024
new 1.0.1 | May 6, 2025 |
---|
#94 in #api-client
14KB
63 lines
π shodan-rust
An async-native Rust client for the Shodan.io API.
shodan-rust
is a lightweight and modern Rust crate for accessing Shodan's powerful search capabilities over the internet of things.
β¨ Features
- β
Native async support using
reqwest
andtokio
- π Easy API key integration
- π Search IP addresses, services, ports
- π§ Clean and extensible design for future Shodan endpoints
- π Includes examples in
/examples
directory
π Usage
Add to your Cargo.toml
[dependencies]
shodan = { git = "https://github.com/YOUR_USERNAME/shodan-rust" }
tokio = { version = "1", features = ["full"] }
Example
use shodan::ShodanClient;
#[tokio::main]
async fn main() {
let client = ShodanClient::new("YOUR_SHODAN_API_KEY");
match client.host_info("8.8.8.8").await {
Ok(info) => println!("{:#?}", info),
Err(e) => eprintln!("Error: {}", e),
}
}
π Check the
examples/
folder for more real-world usage.
π§ͺ Testing
export SHODAN_API_KEY=your_key_here
cargo test
π Roadmap
- IP Lookup
- Honeyscore (Shodan Addon)
- Search Query
- Hostnames & DNS Resolve
- Error handling improvements
π€ Contributing
PRs, ideas and bug reports are welcome.
Want to extend the library or implement more endpoints? Letβs build it together!
π License
Licensed under the MIT License.
Not affiliated with Shodan.io β this is a community-built Rust library.
Dependencies
~6β20MB
~255K SLoC