Guest User

PortZ

a guest
Jul 17th, 2015
301
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. echo "+----+      +--+       +----+   ---+---      -----+"
  4. echo "|    |     /  \     /      \     |           / "
  5. echo "|   /     |    |   |             |          /  "
  6. echo "|--+      |    |   |             |         /   "
  7. echo "|          \  /    |             |        /    "
  8. echo "|           +--+     |             |     +----- "
  9.  
  10. #ask user if they want to use the service or exit (in menu format)
  11. echo
  12. echo "Enter IP address to scan (will scan the subnet)"
  13. echo "Example: google.com is 74.125.225.0"
  14. read IP
  15. echo ""$IP"? Are you sure?."
  16. #Y/n prompt here
  17. #if n go to ip selection
  18. #else continue
  19. echo "Okay"
  20. echo
  21.  
  22. echo "Enter port to be scanned"
  23. echo "Example: 5505"
  24. read PORT
  25. echo ""$PORT"? Are you sure?"
  26. #Y/n prompt here
  27. #in n go to port selection
  28. #else continue
  29. echo "Okay"
  30. echo
  31.  
  32. echo "Scanning "$IP" subnet for port "$PORT" Is this correct?"
  33. #Y/n prompt here
  34. #if n, then ask user which part is incorrect
  35. #if ip incorrect, go to ip selection. if port incorrect, go to port selection
  36. #else continue
  37. echo "Okay"
  38. nmap -sT $IP/24 -p $PORT -oG ports
  39.  
  40. cat ports | grep open > portsopen
  41. cat portsopen | cut -f2 -d "." | cut -f1 -d "(" > portsvuln
  42. less portsvuln
  43.  
  44. #Change as needed!
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×