pull/679/head
Daniel Pascual 2024-08-07 17:10:28 +02:00
parent 798f05a117
commit 3b69446185
1 changed files with 3 additions and 3 deletions

View File

@ -123,9 +123,9 @@ class GoogleThreatIntelligenceParser:
value=get_key( value=get_key(
report, ('attributes.popular_threat_classification' report, ('attributes.popular_threat_classification'
'.suggested_threat_label'))) '.suggested_threat_label')))
analysis = report.get('last_analysis_stats') analysis = report.get_key('attributes.last_analysis_stats')
total = self.get_total_analysis(analysis, total = self.get_total_analysis(
report.get('known_distributors')) analysis, report.get_key('attributes.known_distributors'))
detection_ratio = f"{analysis['malicious']}/{total}" if analysis else '-/-' detection_ratio = f"{analysis['malicious']}/{total}" if analysis else '-/-'
report_object.add_attribute( report_object.add_attribute(
'detection-ratio', type='text', 'detection-ratio', type='text',