Scripts I built
put nmap ports into one line.
#!/bin/bash
# this script takes nmap scan result (ports) and put them in one line with a comma seperator
# i.e) 22,80,459,2222
#
echo "Please enter the file name you want to use:"
read file_name
combine_ports() {
cat $file_name | awk '{print $1}'| sed 's/\/tcp//g' | sed 's/,$//g'
}
combine_ports
Now we can use to scan with nmap like:
nmap -p 22,80,459,2222 -Pn IP -A -sC
Last modified 1yr ago