Skip to content

Commit

Permalink
Merge branch 'hotfix/3.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Nov 9, 2022
2 parents 9c76710 + 438c12f commit 8901c2b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ thehive-templates/*.sh
.idea
.DS_Store
.vscode
.venv
venv

Cortex-analyzers.iml

Expand Down
2 changes: 1 addition & 1 deletion analyzers/GoogleVisionAPI/GoogleVisionAPI_WebDetection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
# coding:utf-8

from cortexutils.analyzer import Analyzer
Expand Down
11 changes: 7 additions & 4 deletions analyzers/VirusTotal/virustotal.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ def __init__(self):
"config.download_sample_if_highlighted", False
)
self.obs_path = None
self.proxies = self.get_param("config.proxy", None)
self.vt = Client(apikey=self.virustotal_key, proxy=self.proxies)
self.proxies = self.get_param("config.proxy.https", None)
if os.environ.get("REQUESTS_CA_BUNDLE"):
os.environ["SSL_CERT_FILE"] = os.environ["REQUESTS_CA_BUNDLE"]
self.vt = Client(apikey=self.virustotal_key, proxy=self.proxies, verify_ssl=None, trust_env=True)

def get_file(self, hash):
self.obs_path = "{}/{}".format(tempfile.gettempdir(), hash)
Expand Down Expand Up @@ -323,8 +325,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
2 changes: 1 addition & 1 deletion responders/FalconCustomIOC/FalconCustomIOC.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python2
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import requests
Expand Down
2 changes: 1 addition & 1 deletion responders/KnowBe4/KnowBe4.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
# encoding: utf-8

from cortexutils.responder import Responder
Expand Down

0 comments on commit 8901c2b

Please sign in to comment.