From 6359dd892e4121b871496c089d47a7a7b70d54e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leonard?= Date: Thu, 21 Dec 2017 08:08:52 +0100 Subject: [PATCH] #130 - set and call VT API with configured proxies --- analyzers/VirusTotal/virustotal.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/analyzers/VirusTotal/virustotal.py b/analyzers/VirusTotal/virustotal.py index 69a653199..3797f7128 100755 --- a/analyzers/VirusTotal/virustotal.py +++ b/analyzers/VirusTotal/virustotal.py @@ -8,6 +8,7 @@ import hashlib from virustotal_api import PublicApi as VirusTotalPublicApi +#from virus_total_apis import PublicApi as VirusTotalPublicApi from cortexutils.analyzer import Analyzer @@ -18,6 +19,8 @@ def __init__(self): self.service = self.getParam('config.service', None, 'Service parameter is missing') self.virustotal_key = self.getParam('config.key', None, 'Missing VirusTotal API key') self.polling_interval = self.getParam('config.polling_interval', 60) + self.proxies = self.getParam('config.proxy', None) + def wait_file_report(self, id): results = self.check_response(self.vt.get_file_report(id)) @@ -133,8 +136,7 @@ def summary(self, raw): def run(self): Analyzer.run(self) - - self.vt = VirusTotalPublicApi(self.virustotal_key) + self.vt = VirusTotalPublicApi(self.virustotal_key, self.proxies) if self.service == 'scan': if self.data_type == 'file':