Update virustotal.py

pull/89/head
CheYenBzh 2017-01-04 13:43:45 +01:00 committed by Raphaël Vinot
parent 15c3f0d482
commit d7b33532eb
1 changed files with 14 additions and 6 deletions

View File

@ -136,12 +136,20 @@ def getMoreInfo(req, key):
params = {"hash":hsh, "apikey":key}) params = {"hash":hsh, "apikey":key})
malsample = sample.content malsample = sample.content
r.append({"types":["malware-sample"], if isset(data, "submission_names"):
"categories":["Payload delivery"], r.append({"types":["malware-sample"],
"values":data["submission_names"], "categories":["Payload delivery"],
"data": str(base64.b64encode(malsample), 'utf-8') "values":data["submission_names"],
} "data": str(base64.b64encode(malsample), 'utf-8')
) }
)
else:
r.append({"types":["malware-sample"],
"categories":["Payload delivery"],
"values":data["submission_names"],
"data": str(base64.b64encode(malsample), 'utf-8')
}
)
return r return r
def introspection(): def introspection():