0% found this document useful (0 votes)
115 views

Mybash Nmap Script

This script is a menu for Nmap that displays different scan types in bash to make scanning easier. It lists scan options numbered and prompts the user to select one. Based on the selection, it then prompts for required information like IP addresses or ports before running the corresponding Nmap scan. The options include scanning a single IP, host, or range of IPs and ports as well as common port, all port, SYN, and OS detection scans.

Uploaded by

api-541446689
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views

Mybash Nmap Script

This script is a menu for Nmap that displays different scan types in bash to make scanning easier. It lists scan options numbered and prompts the user to select one. Based on the selection, it then prompts for required information like IP addresses or ports before running the corresponding Nmap scan. The options include scanning a single IP, host, or range of IPs and ports as well as common port, all port, SYN, and OS detection scans.

Uploaded by

api-541446689
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

#!

/bin/bash

# Name: Danny Ghazal


# School: University of Advancing Technology
# Class: NTS370
# Assignment: Final

#This script is a Nmap menu that displays different scan types written in bash
#The purpose of this script is for ease of use so you don’t have to remember all the different
#tacs for the Nmap options. The options will display in a list with numbers listed next to each
#option. To pick a specific option just enter the number that corresponds to the option you’d like
to
# select. After you select your option you will be prompted to provide information such as IPs,
#ports, or hosts you’d like to scan.

Echo “NMAP Menu Plus”

PS3=’Please select a scan type to begin: ‘

options=(“Single IP” “Single Host” “Range of IPs” “Single Port” “Range of Ports” “100 Most
Common Ports” “Scan All Ports” “SYN Scan” “OS Detection” “Quit”)
Select opt in “${options[@]}”
do

case $opt in
“Single IP”)
echo “Please enter the IP you would like to scan”
read $ip
nmap $ip
;;
“Single Host”)
echo “Please enter the host you would like to scan”
read $host
nmap $host
;;
“Range of IPs”)
echo “Please enter the range of IPs you would like to scan”
echo “(example 172.62.10.1-100)”
read $ip
nmap $ip
;;
“Single Port”)
echo “Please enter the IP or Host associated with this port scan”
read $ip
echo “Please enter the port you would like to scan”
read $port
nmap -p $port $ip
;;
“Range of Ports”)
echo “Please enter the IP or Host associated with this port scan”
read $ip
echo “Please enter the range of ports you would like to scan”
echo “example 1-100”
read $ports
nmap -p $ports $ip
;;
“100 Most Common Ports”)
echo “Please enter the IP or Host associated with this scan”
read $ip
nmap -F $ip
;;
“Scan All Ports”)
echo “Please enter the IP or Host associated with this port scan”
read $ip
nmap -p- $ip
;;
“SYN Scan”)
echo “Please enter the IP or Host associated with this scan”
read $ip
nmap -sS $ip
;;
“OS Detection”)
echo “Please enter the IP or Host of the machine you would like to run
OS Detection”
echo “Be aware that OS detection is a best guess and is not always 100
percent correct”
read $ip
nmap -A $ip
;;
“Quit”)
break
;;
*) echo “Invalid Option”;;
esac
done

You might also like