Tidies bin folder and adds open-ports script

This commit is contained in:
Jonathan Hodgson 2019-09-12 21:30:29 +01:00
parent 62e95a50ef
commit a313b122ab
5 changed files with 13 additions and 42 deletions

11
bin/.bin/nmap/open-ports Executable file
View file

@ -0,0 +1,11 @@
#!/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