pub struct VtClient { /* private fields */ }
Implementations§
source§impl VtClient
impl VtClient
sourcepub fn get_comments(
self,
limit: Option<&str>,
filter: Option<&str>,
cursor: Option<&str>
) -> VtResult<CommentsRoot>
pub fn get_comments( self, limit: Option<&str>, filter: Option<&str>, cursor: Option<&str> ) -> VtResult<CommentsRoot>
Retrieves information about the latest comments.
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.get_comments(Some("10"), Some("tag:malware"), None);
sourcepub fn get_comment(self, comment_id: &str) -> VtResult<CommentRoot>
pub fn get_comment(self, comment_id: &str) -> VtResult<CommentRoot>
Retrieve a public_api.comment information.
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
let comment_id = "u-011915942db556bbab5137f761efe61fed2b00598fea900360b800b193a7bf31-d94d7c8a";
vt.get_comment(comment_id);
sourcepub fn delete_comment(self, comment_id: &str) -> VtResult<CommentRoot>
pub fn delete_comment(self, comment_id: &str) -> VtResult<CommentRoot>
Delete a public_api.comment.
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
let comment_id = "u-011915942db556bbab5137f761efe61fed2b00598fea900360b800b193a7bf31-d94d7c8a";
vt.delete_comment(comment_id);
source§impl VtClient
impl VtClient
sourcepub fn domain_info(&self, domain: &str) -> VtResult<Root>
pub fn domain_info(&self, domain: &str) -> VtResult<Root>
Get the report of a given Domain
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
println!("{:?}", vt.domain_info("google.com"))
source§impl VtClient
impl VtClient
sourcepub fn file_info(&self, id: &str) -> VtResult<Root>
pub fn file_info(&self, id: &str) -> VtResult<Root>
Retrieve public_api.file scan reports id: SHA-256, SHA-1 or MD5 identifying the public_api.file
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.file_info("44d88612fea8a8f36de82e1278abb02f");
sourcepub fn file_scan(&self, file: &str) -> VtResult<ScanRoot>
pub fn file_scan(&self, file: &str) -> VtResult<ScanRoot>
Upload and scan a public_api.file
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
println!("{:?}", vt.file_scan("data/eicar.com.txt"));
sourcepub fn file_rescan(&self, id: &str) -> VtResult<ScanRoot>
pub fn file_rescan(&self, id: &str) -> VtResult<ScanRoot>
Re-submit/Re-scan already submitted files id: SHA-256, SHA-1 or MD5 identifying the public_api.file
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.file_rescan("44d88612fea8a8f36de82e1278abb02f");
source§impl VtClient
impl VtClient
sourcepub fn ip_info(&self, ip_address: &str) -> VtResult<Root>
pub fn ip_info(&self, ip_address: &str) -> VtResult<Root>
Get the report of a given IP Address
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
println!("{:?}", vt.ip_info("192.168.2.1"));
sourcepub fn ip_comments(
&self,
ip_address: &str
) -> VtResult<Collection<CommentAttributes>>
pub fn ip_comments( &self, ip_address: &str ) -> VtResult<Collection<CommentAttributes>>
Get the comments from an ip address
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("API Key");
println!("{:?}", vt.ip_comments("192.168.2.1"));
sourcepub fn add_ip_comment(
&self,
ip_address: &str,
attrs: CommentAttributes
) -> VtResult<Object<CommentAttributes>>
pub fn add_ip_comment( &self, ip_address: &str, attrs: CommentAttributes ) -> VtResult<Object<CommentAttributes>>
Get the comments from an ip address
§Example Usage
use vt3::VtClient;
use vt3::public_api::ip::CommentAttributes;
let vt = VtClient::new("API Key");
let attrs = CommentAttributes::new(
None,
None,
None,
Some("This is an example".to_string()),
None,
);
println!("{:?}", vt.add_ip_comment("192.168.2.1", attrs));
List related objects of an ip address
§Example Usage
use vt3::VtClient;
use vt3::public_api::ip::Relationships;
let vt = VtClient::new("API Key");
let res = vt.list_ip_related_objects("192.168.1.1", Relationships::Comments);
List related ids of an ip address
§Example Usage
use vt3::VtClient;
use vt3::public_api::ip::Relationships;
let vt = VtClient::new("API Key");
let res = vt.list_ip_related_ids("192.168.1.1", Relationships::Comments);
sourcepub fn list_ip_votes(&self, ip_address: &str) -> VtResult<Votes>
pub fn list_ip_votes(&self, ip_address: &str) -> VtResult<Votes>
List votes for an ip address
§Example Usage
use vt3::VtClient;
use vt3::public_api::ip::Relationships;
let vt = VtClient::new("API Key");
let res = vt.list_ip_votes("192.168.1.1");
pub fn create_ip_vote( &self, ip_address: &str, attrs: VoteAttributes ) -> VtResult<Vote>
source§impl VtClient
impl VtClient
sourcepub fn url_scan(&self, resource_url: &str) -> VtResult<ScanRoot>
pub fn url_scan(&self, resource_url: &str) -> VtResult<ScanRoot>
Scan an URL
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
let url = "https://example.com";
println!("{:?}", vt.url_scan(url));
sourcepub fn url_rescan(&self, resource_id: &str) -> VtResult<ScanRoot>
pub fn url_rescan(&self, resource_id: &str) -> VtResult<ScanRoot>
Re-analyse/Re-Scan an URL
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
let url = "https://example.com";
println!("{:?}", vt.url_scan(url));
sourcepub fn url_info(&self, resource_url: &str) -> VtResult<Root>
pub fn url_info(&self, resource_url: &str) -> VtResult<Root>
Get the report of a given Url
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
let resource = "https://www.example.com";
println!("{:?}", vt.url_info(resource));
sourcepub fn url_info_by_id(&self, resource_id: &str) -> VtResult<Root>
pub fn url_info_by_id(&self, resource_id: &str) -> VtResult<Root>
Get the report of a given Url by its resource id. Generally you can first
submit a public_api.url for scanning, and then, get the resource_id (data.id
)
and then url_info_by_id(data.id)
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
let resource = "https://www.example.com";
let resource_id = vt.url_scan(resource).unwrap();
println!("{:?}", vt.url_info_by_id(&resource_id.data.id))
source§impl VtClient
impl VtClient
sourcepub fn user_info(&self, id: &str) -> VtResult<UserRoot>
pub fn user_info(&self, id: &str) -> VtResult<UserRoot>
Retrieve user information.
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.user_info("user_id");
sourcepub fn delete_user(&self, id: &str) -> VtResult<UserRoot>
pub fn delete_user(&self, id: &str) -> VtResult<UserRoot>
Delete a user.
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.delete_user("user_id");
sourcepub fn api_usage(
&self,
id: &str,
start_date: Option<&str>,
end_date: Option<&str>
) -> VtResult<ApiUsage>
pub fn api_usage( &self, id: &str, start_date: Option<&str>, end_date: Option<&str> ) -> VtResult<ApiUsage>
Retrieve user’s API usage.
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
// start_date & end_date fomrat is: YYYYMMDD
vt.api_usage("user_id", None, None);
sourcepub fn overall_quotas(&self, id: &str) -> VtResult<OverallQuotaRoot>
pub fn overall_quotas(&self, id: &str) -> VtResult<OverallQuotaRoot>
User’s overall quotas.
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.overall_quotas("user_id");
sourcepub fn group_info(&self, id: &str) -> VtResult<GroupRoot>
pub fn group_info(&self, id: &str) -> VtResult<GroupRoot>
Retrieve group information.
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.overall_quotas("user_id");
sourcepub fn group_members(&self, id: &str) -> VtResult<GroupMembers>
pub fn group_members(&self, id: &str) -> VtResult<GroupMembers>
Retrieve group members.
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.group_members("user_id");
sourcepub fn group_api_usage(
&self,
id: &str,
start_date: Option<&str>,
end_date: Option<&str>
) -> VtResult<ApiUsage>
pub fn group_api_usage( &self, id: &str, start_date: Option<&str>, end_date: Option<&str> ) -> VtResult<ApiUsage>
Retrieve group’s API usage.
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
// start_date & end_date fomrat is: YYYYMMDD
vt.group_api_usage("user_id", None, None);
source§impl VtClient
impl VtClient
sourcepub fn file_feed(&self, time: &str) -> VtResult<Vec<Root>>
pub fn file_feed(&self, time: &str) -> VtResult<Vec<Root>>
Get a file feed batch.
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
// A string in format YYYYMMDDhhmm
vt.file_feed("202106131355");
sourcepub fn file_feed_behaviours(&self, time: &str) -> VtResult<Vec<Root>>
pub fn file_feed_behaviours(&self, time: &str) -> VtResult<Vec<Root>>
Get a file sandbox behaviour feed batch.
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
// A string in format YYYYMMDDhhmm
vt.file_feed("202106131355");
source§impl VtClient
impl VtClient
source§impl VtClient
impl VtClient
sourcepub fn get_rulesets(
&self,
limit: Option<&str>,
order: Option<&str>,
filter: Option<&str>,
cursor: Option<&str>
) -> VtResult<SearchRulesetRoot>
pub fn get_rulesets( &self, limit: Option<&str>, order: Option<&str>, filter: Option<&str>, cursor: Option<&str> ) -> VtResult<SearchRulesetRoot>
Retrieve VT Hunting livehunt rulesets
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.get_rulesets(Some("10"), None, None, None);
sourcepub fn get_ruleset(&self, ruleset_id: &str) -> VtResult<SearchRulesetRoot>
pub fn get_ruleset(&self, ruleset_id: &str) -> VtResult<SearchRulesetRoot>
Retrieve a VT Hunting Livehunt ruleset given by a id
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.get_ruleset("1");
sourcepub fn create_ruleset(
&self,
data: &SubmitLivehuntRuleset
) -> VtResult<SubmitLivehuntRuleset>
pub fn create_ruleset( &self, data: &SubmitLivehuntRuleset ) -> VtResult<SubmitLivehuntRuleset>
Create/Submit a new VT Hunting Livehunt ruleset
§Example Usage
use vt3::{VtClient, SubmitLivehuntRuleset};
let vt = VtClient::new("Your API Key");
let mut data = SubmitLivehuntRuleset::default();
vt.create_ruleset(&data);
sourcepub fn delete_ruleset(&self, ruleset_id: &str) -> VtResult<String>
pub fn delete_ruleset(&self, ruleset_id: &str) -> VtResult<String>
Delete/Remove Hunting ruleset by ID
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.delete_ruleset("1");
sourcepub fn update_ruleset(
&self,
ruleset_id: &str,
data: &SubmitLivehuntRuleset
) -> VtResult<SubmitLivehuntRuleset>
pub fn update_ruleset( &self, ruleset_id: &str, data: &SubmitLivehuntRuleset ) -> VtResult<SubmitLivehuntRuleset>
Update/Modify a VT Hunting Livehunt ruleset
§Example Usage
use vt3::{VtClient, SubmitLivehuntRuleset};
let vt = VtClient::new("Your API Key");
let mut data = SubmitLivehuntRuleset::default();
vt.update_ruleset("1", &data);
source§impl VtClient
impl VtClient
sourcepub fn get_retrohunt_jobs(
&self,
limit: Option<&str>,
filter: Option<&str>,
cursor: Option<&str>
) -> VtResult<SearchJobRoot>
pub fn get_retrohunt_jobs( &self, limit: Option<&str>, filter: Option<&str>, cursor: Option<&str> ) -> VtResult<SearchJobRoot>
Get all or limited RetroHunt jobs
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.get_retrohunt_jobs(Some("10"), None, None);
sourcepub fn get_retrohunt_job(&self, job_id: i32) -> VtResult<SearchJobRoot>
pub fn get_retrohunt_job(&self, job_id: i32) -> VtResult<SearchJobRoot>
Get RetroHunt job by ID
§Example Usage
use vt3::VtClient;
let vt = VtClient::new("Your API Key");
vt.get_retrohunt_job(1);
sourcepub fn create_retrohunt_job(
&self,
data: &SubmitRetrohuntJob
) -> VtResult<SubmitRetrohuntJob>
pub fn create_retrohunt_job( &self, data: &SubmitRetrohuntJob ) -> VtResult<SubmitRetrohuntJob>
Create/Submit a RetroHunt job
§Example Usage
use vt3::{VtClient, SubmitRetrohuntJob};
let vt = VtClient::new("Your API Key");
let mut data = SubmitRetrohuntJob::default();
vt.create_retrohunt_job(&data);