(parser)
| 82 | |
| 83 | |
| 84 | def 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 | |
| 96 | def test_feed_handles_multiple_lines_per_payload(parser): |