Port Scanning: Timing attack * Dynamically insert an `<img>` tag pointing to a hypothetical closed port. Measure time to onerror. * Repeat at least 10 times → average time to get an error for a closed port * Test random port 10 times and measure time to error * If `time_to_error(random_port) > time_to_error(closed_port)*1.3` → port is opened **Consideration**: * Chrome blocks by default a list of "known ports" * Chrome blocks access to local network addresses except localhost through 0.0.0.0
Source: Headless Browser/README.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.