Wednesday, March 5, 2014

VirusTotal API Submission - Submit URL

Found this to be helpful:

#!/usr/bin/python

import json
import simplejson
import urllib
import urllib2
import sys

url = "https://www.virustotal.com/vtapi/v2/url/scan"

if (len(sys.argv) > 1):
        submitURL = sys.argv[1]
        parameters = {"url": submitURL, "apikey": "---API Key---"}
        data = urllib.urlencode(parameters)
        req = urllib2.Request(url,data)
        response = urllib2.urlopen(req)
        output = json.loads(response.read())
        print json.dumps(output, indent=4)
else:
        print "Usage: ./submitURL <url>"

No comments:

Post a Comment

Test Authentication from Linux Console using python3 pexpect

Working with the IT420 lab, you will discover that we need to discover a vulnerable user account.  The following python3 script uses the pex...