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

Function test_feed_handles_partial_frames

tests/test_irc_dpi.py:84–93  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

82
83
84def test_feed_handles_partial_frames(parser):
85 bot_ip = '192.168.1.73'
86 c2_ip = '203.0.113.10'
87 # Split a single line across two payloads
88 msgs1 = _feed(parser, bot_ip, c2_ip, 54321, 6667, 1.0, "NICK b")
89 msgs2 = _feed(parser, bot_ip, c2_ip, 54321, 6667, 1.1, "ot01\r\n")
90 assert msgs1 == []
91 assert len(msgs2) == 1
92 assert msgs2[0].command == 'NICK'
93 assert msgs2[0].params == ['bot01']
94
95
96def test_feed_handles_multiple_lines_per_payload(parser):

Callers

nothing calls this directly

Calls 1

_feedFunction · 0.85

Tested by

no test coverage detected