vt_pdns.py added

first throw on requesting passive dns resolves from virustotal
This commit is contained in:
Tobias Kessels
2019-01-11 13:23:35 +01:00
parent 14e346c9a7
commit b14bc5843c
2 changed files with 103 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ with open(sys.argv[1],'rb') as f:
params = {'apikey': api_key, 'resource': hash.hexdigest()}
headers = {
"Accept-Encoding": "gzip, deflate",
"User-Agent" : "gzip, My Python requests library example client or username"
"User-Agent" : "gzip,python_requests,scan_vt.py"
}
response = requests.get('https://www.virustotal.com/vtapi/v2/file/report', params=params, headers=headers)
@@ -31,4 +31,3 @@ if json_response["response_code"]:
print("{}{}{}{}{}/{}{}{}".format(sys.argv[1],out_sep,hash.hexdigest(),out_sep,json_response["positives"],json_response["total"],out_sep,json_response["permalink"]))
else:
print("{}{}{}{}{}".format(sys.argv[1],out_sep,hash.hexdigest(),out_sep,out_sep))