virustotal提交目录样本

参数:目录 类似 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)




virustotal提交目录样本

上一篇:linux 内核优化&系统初始化


下一篇:DirectShow 录制视频时,如何在视频上画线和输出文字