3 stable releases
Uses new Rust 2024
| new 3.0.3 | Feb 17, 2026 |
|---|---|
| 3.0.2 | Dec 11, 2023 |
| 3.0.1 | Mar 15, 2023 |
#2 in #v3
26KB
363 lines
virustotal3-rs
Library for virustotal API version 3 written in Rust. 🦀
Implemented Features
| Method | Resource | Description |
|---|---|---|
| GET | /api/v3/files/{id} | Retrieve file scan reports |
| POST | /api/v3/files | Upload and scan a file |
| POST | /api/v3/files/{id}/analyse | Rescanning already submitted files |
| GET | /api/v3/urls/{id} | Retrieve URL scan reports |
| POST | /api/v3/urls | Scan an URL |
| POST | /api/v3/{type}/{id}/comments | Make comments for a file or URL or Domain |
| GET | /api/v3/{type}/{id}/comments | Get comments for a file or URL or Domain |
| DELETE | /api/v3/comments/{id} | Delete a comment for a file or URL or Domain |
| GET | /api/v3/domains/{domain} | Retrieves a domain report |
| GET | /api/v3/ip_address/{ip-address} | Retrieve an IP address report |
Example
Cargo.toml:
...
[dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
virustotal3 = { version = "3.0.2" }
main.rs:
use virustotal3::VtClient;
#[tokio::main]
async fn main() {
let api = "Your API KEY";
let url = "The URL you want to check";
let vt = VtClient::new(api);
match vt.scan_url(&url).await {
Ok(res) => {
println!("{:?}", &res.data);
},
Err(err) => { println!("[Error] {err}") }
}
}
More examples in doc.rs/virustotal3
Acknowledgements
- Thanks to owlinux1000 for inital work on virustotal API version 2.
Dependencies
~5–21MB
~238K SLoC