Register
It is currently Thu Oct 23, 2014 7:04 am

Port Scanner - Frontend for nmap


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Wed Jul 12, 2006 2:48 pm   

Joined: Wed Jul 12, 2006 2:36 pm
Posts: 1
Hey everyone,

This is my first attempt at programming/scripting. This script is designed to allow anyone to use the NMap network mapper to do varying levels of portscans against a given host. Eventually I would like to add output capability and some other things. Until then, any hints, suggeestions, or comments would be much appreciated.

Thanks,
Wakizashi

#This script uses the Nmap utility to run portscans on a target host. The #scan #types range from non-intrusive reconnassance scans to a full #blown scan with OS detection and more.
#
#You MUST have Nmap installed to use this script!!!
#
#Portscan v.002
# Written by Wakizashi
#

#These lines get the IP of the target host from the user
#
echo "Enter the IP or Range to scan (x.x.x.x, x.x.x.x/x, or x.x.x.x-x:"
read HOST_NAME

#This part lists the types of scans available to the user
SCAN_TYPE=0
while [ "$SCAN_TYPE" != "exit" ]
do
echo
echo "Choose a scan:?"
echo "C - Change target/range"
echo "0 - List Scan (No Intrusion)"
echo "1 - Detect host (Less Intrusion)"
echo "2 - Scan ports 1-1674 (Intrusive)"
echo "3 - Scan interesting ports (Intrusive)"
echo "4 - Scan ports 1-65535 (Intrusive)"
echo "5 - Basic scan w/OS Detection ()"
echo "exit - Type \"exit\" to quit"
echo ""

read SCAN_TYPE

case $SCAN_TYPE in

c)
echo "Enter the IP or Range to scan (x.x.x.x, x.x.x.x/x, or x.x.x.x-x:"
read HOST_NAME
;;
0)
nmap $HOST_NAME -v -sL #List Scan
;;

1)
nmap $HOST_NAME -v -sP #Host Detection
;;

2)
nmap $HOST_NAME -v -P0 #Scan ports 1-1674
;;

3)
nmap $HOST_NAME -v -F -P0 #Scan only Known Ports
;;

4)
nmap $HOST_NAME -v -P0 -p1-65535 #Scan Ports 1-65535
;;

5)
nmap $HOST_NAME -v -A -P0 #Enable OS Detection
esac
done


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP