You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
169 B
12 lines
169 B
5 years ago
|
#!/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
|