Skip to content

Instantly share code, notes, and snippets.

@junv
junv / VirusTotalAPI.rb
Created August 4, 2011 08:30
VirusTotal Public API with ruby
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
require 'rest-client'
require 'mechanize'
agent = Mechanize.new
res = agent.post( 'https://www.virustotal.com/api/get_file_report.json',
'key' => 'your key',
'resource' => 'file hash(md5/sha1/sha256)' )