home / blog

Tag Archives: bash

Simple port scanner in BASH using netcat

for port in {1..65535}; do nc -w 1 localhost $port > /dev/null && echo “Port $port open” || echo “Port $port closed”; done;

Posted in geek | Tagged | Leave a comment