Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ###Made by Appledash48 for all who wish to use it
- ###Pause function
- function pause(){
- read -sn 1 -p "Press any key to continue..."
- }
- ###Hping caller
- function hping {
- clear
- echo "Enter IP address to scan (will scan the subnet)"
- echo "Example: google.com is 74.125.225.0"
- read IPn
- echo ""$IPn"? Okay."
- echo
- echo "Enter port to be scanned"
- echo "Example: 5505"
- echo "Example2: To scan multiple ports, format it like this: 5505-6000"
- read PORTn
- echo ""$PORTn"? Okay."
- echo
- echo "Enter packets to be sent"
- read PACKETS
- echo ""PACKETS" Okay"
- echo
- echo "Scanning "$IPn" subnet for port "$PORTn" with "$PACKETS" packets. Is this correct? [Y/n]"
- read param
- if [[ $param = Y || $param = y ]] ; then
- echo "Okay"
- pause
- echo
- hping3 -c $PACKETS -S $IPn/24 -p PORTn > hpingscan
- cat hpingscan
- else hping
- fi
- }
- ###nmap caller
- function nmap {
- clear
- echo "Enter IP address to scan (will scan the subnet)"
- echo "Example: google.com is 74.125.225.0"
- read IP
- echo ""$IP"? Okay."
- echo
- echo "Enter port to be scanned"
- echo "Example: 5505"
- echo "Example2: To scan multiple ports, format it like this: 5505-6000"
- read PORT
- echo ""$PORT"? Okay."
- echo
- echo "Scanning "$IP" subnet for port "$PORT" Is this correct? [Y/n]"
- read param
- if [[ $param = Y || $param = y ]] ; then
- echo "Okay"
- pause
- echo
- nmap -sT $IP/24 -p $PORT -oG ports
- cat ports | grep open > portsopen
- cat portsopen | cut -f2 -d "." | cut -f1 -d "(" > portsvuln
- less portsvuln
- else nmap
- fi
- }
- ###title caller
- function title {
- clear
- echo "+----+ +--+ +----+ ---+--- -----+"
- echo "| | / \ / \ | / "
- echo "| / | | | | / "
- echo "|--+ | | | | / "
- echo "| \ / | | / "
- echo "| +--+ | | +----- "
- echo "================================================="
- select CHOOSE in "Nmap" "hping" "EXIT" ; do
- case $CHOOSE in
- "1" )
- nmap
- clear
- pause ;;
- "2" )
- hping
- clear
- pause ;;
- "3" )
- clear
- exit 0 ;;
- esac
- break
- done
- }
- title
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement