参数:目录 类似 C:\sample\ 不要忘记 \ ,C:\sample这样是不对的
#encoding = utf-8 import postfile import os,sys,time def vt_submit(file): host = "www.virustotal.com" selector = "https://www.virustotal.com/vtapi/v2/file/scan" fields = [("apikey", "22222222222222222222222222222222222222222222222222222")] file_to_send = open(file, "rb").read() files = [("file", file, file_to_send)] json = postfile.post_multipart(host, selector, fields, files) print json rootDir = sys.argv[1] for lists in os.listdir(rootDir): print rootDir + lists time.sleep(15) vt_submit(rootDir+lists)