Skip to content

Commit 007424f

Browse files
committed
Relax portscan syn_scanned assertion for async batch splitting
Same fix already applied to TestPortscanPingFirst — individual /32s may appear alongside /24s when event delivery splits across batches.
1 parent 09024d1 commit 007424f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

bbot/test/test_step_2/module_tests/test_module_portscan.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ async def run_masscan(command, *args, **kwargs):
7474
module_test.monkeypatch.setattr(module_test.scan.helpers, "run_live", run_masscan)
7575

7676
def check(self, module_test, events):
77-
assert set(self.syn_scanned) == {"8.8.8.0/24", "8.8.4.0/24"}
77+
# The /24 ranges must always be syn-scanned; individual /32s may also appear
78+
# if async event delivery splits targets across multiple batches (observed on Python 3.13+)
79+
assert {"8.8.8.0/24", "8.8.4.0/24"}.issubset(set(self.syn_scanned))
7880
assert set(self.ping_scanned) == set()
7981
assert self.syn_runs >= 1
8082
assert self.ping_runs == 0

0 commit comments

Comments
 (0)