Advertisement
MauricioCorrea

VirusTotalAPI Send File Scan Example

Jan 25th, 2013
4,844
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.90 KB | None | 0 0
  1.  
  2. package virustotalexample;
  3.  
  4. /*
  5.  *
  6.  * @author Mauricio Correa
  7.  *
  8.  */
  9.  
  10. import java.io.IOException;
  11. import java.util.Set;
  12. import virustotalapi.ReportFileScan;
  13. import virustotalapi.VirusTotal;
  14.  
  15. public class VirusTotalExample {
  16.  
  17.    
  18.     public static void main(String[] args) throws IOException {
  19.        
  20.         VirusTotal VT = new VirusTotal("YOUR_API_KEY"); // Your Virus Total API Key
  21.  
  22.         Set <ReportFileScan> Report = VT.sendFileScan("C:\\instaladorchrome.exe"); //pimpmywindow adware
  23.        
  24.    
  25.         for(ReportFileScan report : Report){
  26.            
  27.  
  28.             System.out.println("URL: "+report.getPermaLink()+" Response code: "+report.getResponseCode());
  29.  
  30.  
  31.         }
  32.        
  33. }
  34.    
  35. }
  36.  
  37.  
  38.  
  39. /*
  40.  
  41. Result about code
  42.  
  43. URL: "https://www.virustotal.com/file/c001e8e15cf1beedebd3a5dccd7d91fee6346a45c0051a84e2225283b0613e65/analysis/1359167138/" Response code: 1
  44.  
  45. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement