#!/bin/sh

# use netcat to scan ports locally,
# not all ports are open to outside, 
# use it as the first step. 
host=localhost
[ "$1" != "" ] && host=$1
echo "scanning $host ..."
nc -v -w 4 -z $host 1-65535
echo "scanning done"
