Dotfiles/bin/.bin/nmap/open-ports
2019-09-12 21:30:29 +01:00

11 lines
169 B
Bash
Executable file

#!/usr/bin/env bash
IP="$1"
if [ -n "$IP" ]; then
nmap $IP -p0- | # Get the nmap output
cut -d '/' -f1 | #
sed -n '/^[0-9]/p'
else
echo "Print an ip address"
fi