sensepost / gowitness

🔍 gowitness - a golang, web screenshot utility using Chrome Headless
GNU General Public License v3.0
2.82k stars 324 forks source link

Add explicitly-allowed-ports #212

Open EatonChips opened 6 months ago

EatonChips commented 6 months ago

Problem

When taking screenshots of web services running on non-standard ports, chrome can classify them as 'Unsafe' and throw a net::ERR_UNSAFE_PORT error.

Proposed Solution

To prevent this the --explicitly-allowed-port flag was implemented in chrome. Unfortunately it appears that each port must be explicit and ranges such as 1-65535 or wildcards are not supported. This creates a comma-separated list from 1-65535 and sets it as the --explicitly-allowed-port flag value, allowing screenshots to be taken on web services running on any port.