Skip to content

Instantly share code, notes, and snippets.

@jonaschl
Created November 18, 2015 11:20

Revisions

  1. jonaschl created this gist Nov 18, 2015.
    9 changes: 9 additions & 0 deletions bash-virustotal-api.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/bin/bash
    #upload a file
    curl -X POST 'https://www.virustotal.com/vtapi/v2/file/scan' --form apikey=your-apikey --form [email protected];eicar.com.txt

    #rescan a file
    curl -X POST 'https://www.virustotal.com/vtapi/v2/file/rescan' --form apikey=your-apikey --form resource=275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f

    # get scan results
    curl -X POST 'https://www.virustotal.com/vtapi/v2/file/report' --form apikey=your-apikey --form resource=275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f