#open an editor
leafpad
#once opened type the following:
#! /bin/bash
echo "Enter the starting IP address : "
read FirstIP
echo "Enter the last octet of the last IP address : "
read LastOctetIP
echo "Enter the port number you want to scan for : "
read port
nmap -sT $FirstIP-$LastOctetIP -p $port |/dev/null -oG NameOfTheFile
cat NameOfTheFile | grep open > NameOfTheFile2
cat NameOfTheFile2
#Save your script by giving it a name e.g "NmapScanner.sh"
#Run the scanner by typing the following command
./NmapScanner.sh
#Below is an example of how it would work
Enter the starting IP address :
192.168.182.0
Enter the last octet of the last address :
255
Enter the port number you want to scan for :
3306
#and it will give you the result at the end
#If you are unsure about your ip address type
ifconfig
#for command promt type
ipconfig
#In the command prompt you would be able to see the default gateway, which will be the ip address of your internet
#Type the gateway ip address when the script asks you to enter the first ip address