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

Function analyzer

tests/test_portscan_false_positives.py:26–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25@pytest.fixture
26def analyzer():
27 with patch.object(TrafficAnalyzer, '_detect_interface', return_value='lo'), \
28 patch.object(TrafficAnalyzer, '_detect_local_ips',
29 return_value={'127.0.0.1', '192.168.1.10'}), \
30 patch.object(TrafficAnalyzer, '_detect_gateway_ips',
31 return_value=set()):
32 a = TrafficAnalyzer(shared_data=None, interface='lo')
33 a.MAX_ALERTS_PER_MINUTE = 10_000
34 a._alert_dedup_window = 0
35 return a
36
37
38def _portscan_alerts(analyzer):

Callers

nothing calls this directly

Calls 2

TrafficAnalyzerClass · 0.90
setFunction · 0.50

Tested by

no test coverage detected