Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "+----+ +--+ +----+ ---+--- -----+"
- echo "| | / \ / \ | / "
- echo "| / | | | | / "
- echo "|--+ | | | | / "
- echo "| \ / | | / "
- echo "| +--+ | | +----- "
- #ask user if they want to use the service or exit (in menu format)
- echo
- echo "Enter IP address to scan (will scan the subnet)"
- echo "Example: google.com is 74.125.225.0"
- read IP
- echo ""$IP"? Are you sure?."
- #Y/n prompt here
- #if n go to ip selection
- #else continue
- echo "Okay"
- echo
- echo "Enter port to be scanned"
- echo "Example: 5505"
- read PORT
- echo ""$PORT"? Are you sure?"
- #Y/n prompt here
- #in n go to port selection
- #else continue
- echo "Okay"
- echo
- echo "Scanning "$IP" subnet for port "$PORT" Is this correct?"
- #Y/n prompt here
- #if n, then ask user which part is incorrect
- #if ip incorrect, go to ip selection. if port incorrect, go to port selection
- #else continue
- echo "Okay"
- nmap -sT $IP/24 -p $PORT -oG ports
- cat ports | grep open > portsopen
- cat portsopen | cut -f2 -d "." | cut -f1 -d "(" > portsvuln
- less portsvuln
- #Change as needed!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement