mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
deploy: fix virustotal report fetching, use GET and query string
This commit is contained in:
parent
f2b48575e6
commit
058b47e484
1 changed files with 4 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue