class VirusTotal::Client::URL
Public Instance Methods
analyse(url)
click to toggle source
Analyse an URL
.
@see developers.virustotal.com/v3.0/reference#urls-analyse
@param [String] url URL
identifier
@return [Hash]
# File lib/virustotal/clients/url.rb, line 22 def analyse(url) id = to_id(url) _post("/urls/#{id}/analyse") { |json| json } end
network_location(url)
click to toggle source
Domain
or IP address for a URL
.
@see developers.virustotal.com/v3.0/reference#urlsidnetwork_location
@param [String] url URL
identifier
@return [Hash]
# File lib/virustotal/clients/url.rb, line 36 def network_location(url) id = to_id(url) _get("/urls/#{id}/network_location") { |json| json } end
Private Instance Methods
relationships()
click to toggle source
# File lib/virustotal/clients/url.rb, line 47 def relationships @relationships ||= %w( analyses downloaded_files graphs last_serving_ip_address redirecting_urls submissions ).map(&:to_sym) end
to_id(url)
click to toggle source
# File lib/virustotal/clients/url.rb, line 43 def to_id(url) Base64.urlsafe_encode64(url).split("=").first end