import postfile
import sys, getopt
def main(argv):
inputfile = sys.argv[1]
host = "www.virustotal.com"
mfile = inputfile
selector = "https://www.virustotal.com/vtapi/v2/file/scan"
fields = [("apikey", "YOUR PUBLIC API KEY")]
file_to_send = open(mfile, "rb").read()
files = [("file", mfile, file_to_send)]
json = postfile.post_multipart(host, selector, fields, files)
print json
if __name__ == "__main__":
main(sys.argv[1:])
You can replace the 'YOUR PUBLIC API KEY' with your own key. Get it at VirusTotal.com.
~ alternat0r