Scripts I built

put nmap ports into one line.

# 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'


Now we can use to scan with nmap like:

nmap -p 22,80,459,2222 -Pn IP -A -sC 

Last updated