MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / get_traffic_host_details

Function get_traffic_host_details

webapp_modern.py:17129–17143  ·  view source on GitHub ↗

Get detailed traffic stats for a specific host

(ip)

Source from the content-addressed store, hash-verified

17127 summary = threat_intelligence.get_enriched_findings_summary() or {}
17128 default_last_update = summary.get('last_intelligence_update')
17129
17130 serialized_findings = [
17131 _serialize_enriched_finding(finding_id, enriched_finding, default_last_update)
17132 for finding_id, enriched_finding in threat_intelligence.enriched_findings.items()
17133 ]
17134
17135 risk_distribution = {'critical': 0, 'high': 0, 'medium': 0, 'low': 0}
17136 active_campaigns = set()
17137
17138 for enriched_finding in threat_intelligence.enriched_findings.values():
17139 score = enriched_finding.dynamic_risk_score or 0.0
17140 if score >= 9.0:
17141 risk_distribution['critical'] += 1
17142 elif score >= 7.0:
17143 risk_distribution['high'] += 1
17144 elif score >= 4.0:
17145 risk_distribution['medium'] += 1
17146 else:

Callers

nothing calls this directly

Calls 3

get_host_detailsMethod · 0.80
errorMethod · 0.80
get_traffic_analyzerFunction · 0.70

Tested by

no test coverage detected