GUI development

This commit is contained in:
BarsTiger
2022-01-27 19:46:10 +02:00
parent d3b5fa127e
commit 4b3079733b
8 changed files with 143 additions and 255 deletions

View File

@@ -49,6 +49,13 @@ def get_report(filename):
headers = {'x-apikey': get_key()}
response = requests.get(api_url, headers=headers)
analysis = dict()
analysis['detect'] = response.json()['data']['attributes']['last_analysis_stats']
analysis['link'] = 'https://www.virustotal.com/gui/file/' + response.json()['data']['id']
try:
analysis['detect'] = response.json()['data']['attributes']['last_analysis_stats']
except:
analysis['detect'] = 'No data'
try:
analysis['link'] = 'https://www.virustotal.com/gui/file/' + response.json()['data']['id']
except:
analysis['link'] = 'No data'
return analysis