Skip to content

Commit

Permalink
Merge tag '3.3.4' into develop
Browse files Browse the repository at this point in the history
3.3.4
  • Loading branch information
jeromeleonard committed Jan 10, 2024
2 parents 437d175 + e23e7fe commit c43bfdd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion analyzers/VirusTotal/virustotal.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from vt import Client, error
from cortexutils.analyzer import Analyzer
from base64 import urlsafe_b64encode, b64decode
from vt.object import WhistleBlowerDict


class VirusTotalAnalyzer(Analyzer):
Expand Down Expand Up @@ -362,8 +363,15 @@ def run(self):
else:
self.error("Invalid service")
results['iocs'] = iocs
self.report(results)
self.report(self.convert_WhistleBlowerDict_to_dict(results))

def convert_WhistleBlowerDict_to_dict(self, o):
if isinstance(o, (dict, WhistleBlowerDict)):
return {k: self.convert_WhistleBlowerDict_to_dict(v) for k, v in o.items()}
elif isinstance(o, (list, tuple)):
return [self.convert_WhistleBlowerDict_to_dict(v) for v in o]
else:
return o
def get_yararuleset(self, results, iocs):
for yara_result in results["attributes"].get( "crowdsourced_yara_results", []):
yara_ruleset = self.vt.get_object(
Expand Down

0 comments on commit c43bfdd

Please sign in to comment.