Advertisement
Guest User

PortZ

a guest
Jul 17th, 2015
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.19 KB | None | 0 0
  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!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement