Skip to content

Commit

Permalink
#1130 proxies should be str and not dict. see https://github.com/Viru…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Oct 27, 2022
1 parent 9c76710 commit 49adf19
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions analyzers/VirusTotal/virustotal.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self):
"config.download_sample_if_highlighted", False
)
self.obs_path = None
self.proxies = self.get_param("config.proxy", None)
self.proxies = self.get_param("config.proxy.https", None)
self.vt = Client(apikey=self.virustotal_key, proxy=self.proxies)

def get_file(self, hash):
Expand Down Expand Up @@ -323,8 +323,9 @@ def run(self):
filepath = self.get_param("file", None, "File is missing")
with open(filepath, "rb") as f:
self.vt.scan_file(file=f, wait_for_completion=True)
except Exception:
self.report({"message": "Report not found."})
except Exception as e:
# self.report({"message": "Report not found."})
self.report({"message": str(e)})
return

# download if hash, dangerous and not seen by av
Expand Down

0 comments on commit 49adf19

Please sign in to comment.