mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-13 10:30:13 +01:00
deploy: fix virustotal report fetching, use GET and query string
This commit is contained in:
parent
f2b48575e6
commit
058b47e484
@ -476,7 +476,7 @@ def upload_to_android_observatory(repo_section):
|
||||
logging.info(message)
|
||||
|
||||
|
||||
def upload_to_virustotal(repo_section, vt_apikey):
|
||||
def upload_to_virustotal(repo_section, virustotal_apikey):
|
||||
import json
|
||||
import requests
|
||||
|
||||
@ -509,13 +509,13 @@ def upload_to_virustotal(repo_section, vt_apikey):
|
||||
"User-Agent": "F-Droid"
|
||||
}
|
||||
data = {
|
||||
'apikey': vt_apikey,
|
||||
'apikey': virustotal_apikey,
|
||||
'resource': package['hash'],
|
||||
}
|
||||
needs_file_upload = False
|
||||
while True:
|
||||
r = requests.post('https://www.virustotal.com/vtapi/v2/file/report',
|
||||
data=data, headers=headers)
|
||||
r = requests.get('https://www.virustotal.com/vtapi/v2/file/report?'
|
||||
+ urllib.parse.urlencode(data), headers=headers)
|
||||
if r.status_code == 200:
|
||||
response = r.json()
|
||||
if response['response_code'] == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user