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

Function _build_db

tests/test_passive_host_discovery.py:147–151  ·  view source on GitHub ↗
(existing_by_ip=None)

Source from the content-addressed store, hash-verified

145
146
147def test_listening_port_not_recorded_for_ephemeral(analyzer):
148 # Random ephemeral source; the host is a client, not a listener.
149 line = f'{BASE_TS} IP 192.168.1.50.40000 > 192.168.1.20.443: tcp 512'
150 analyzer._parse_and_record_packet(line)
151
152 listening = analyzer._listening_ports.get('192.168.1.50', set())
153 assert 40000 not in listening
154

Calls 1

getMethod · 0.45

Tested by

no test coverage detected