Crates.io | vt3 |
lib.rs | vt3 |
version | 0.7.3 |
source | src |
created_at | 2021-06-13 15:26:13.18243 |
updated_at | 2024-04-12 03:26:24.221746 |
description | VirusTotal REST API v3 (Public & Enterprise) |
homepage | |
repository | https://github.com/marirs/vt3-rs |
max_upload_size | |
id | 409611 |
size | 134,673 |
VT3 provides an easy api interface to use VirusTotal v3 REST endpoints, including those exclusive to VirusTotal Enterprise. See below for list of available API's:
features = ["enterprise"]
features = ["hunting"]
features = ["feeds"]
feature
flags[dependencies]
vt3 = "0.7.2"
[dependencies]
vt3 = { version = "0.7.2", features = ["enterprise"] }
ip information
use vt3::VtClient;
fn main() {
let api_key = match std::env::args()
.skip(1)
.next()
.ok_or_else(|| "Please provide the api key!")
{
Ok(api_key) => api_key,
Err(e) => {
println!("{:?}", e);
std::process::exit(1)
}
};
let ip_address = "5.2.69.42";
let res = VtClient::new(&api_key).ip_info(ip_address);
match res {
Ok(report) => println!("{:#?}", report),
Err(e) => println!("Error: {}", e.to_string()),
}
}
user agent
for the clientuse vt3::VtClient;
fn main() {
let api_key = match std::env::args()
.skip(1)
.next()
.ok_or_else(|| "Please provide the api key!")
{
Ok(api_key) => api_key,
Err(e) => {
println!("{:?}", e);
std::process::exit(1)
}
};
let ip_address = "5.2.69.42";
let res = VtClient::new(&api_key)
.user_agent("Chrome for Windows")
.ip_info(ip_address);
match res {
Ok(report) => println!("{:#?}", report),
Err(e) => println!("Error: {}", e.to_string()),
}
}
To run the examples - Universal API Endpoints
:
cargo run --example domain_info <your_api_key>
cargo run --example ip_info <your_api_key>
cargo run --example url_info <your_api_key>
cargo run --example url_info_by_id <your_api_key>
cargo run --example url_rescan <your_api_key>
cargo run --example file_info <your_api_key>
cargo run --example file_scan <your_api_key>
cargo run --example file_rescan <your_api_key>
cargo run --example get_latest_comments <your_api_key>
cargo run --example get_comment <your_api_key>
To run the examples - Enterprise API Endpoints
:
cargo run --example user_info --features="enterprise" <your_api_key> <user_id>
cargo run --example delete_user --features="enterprise" <your_api_key> <user_id>
cargo run --example api_usage --features="enterprise" <your_api_key> <user_id>
cargo run --example overall_quotas --features="enterprise" <your_api_key> <user_id>
cargo run --example group_info --features="enterprise" <your_api_key> <group_id>
cargo run --example group_api_usage --features="enterprise" <your_api_key> <group_id>
cargo run --example group_members --features="enterprise" <your_api_key> <group_id>
To run the examples - Hunting API Endpoint
:
cargo run --example livehunt_get_rulesets --features="hunting" <your_api_key>
cargo run --example retrohunt_jobs --features="hunting" <your_api_key>
License: MIT