OK PASSWOWRD CODE IS REMOVED =D. File ibnz.php
--------------------------------------------------------------------------
<?
if (file_exists("update.txt")) {
$archivo = file("update.txt"); }
else {
$archivo[0] ="this notice will be show in launcher";
}
if (!$_POST) { ?>
<style type="text/css">
<!--
.Estilo1 {
color: #0000FF;
font-weight: bold;
}
-->
</style>
<form method="post" action="Ibnz.php">
<table width="428" border="1" align="center">
<tr>
<td><div align="center">
<input name="mensaje" type="text" id="mensaje" value="<? echo $archivo[0]; ?>" size="100" />
<input type="submit" name="Submit" value="Packear" />
</div>
<div align="center"></div></td>
</tr>
</table>
<p align="center" class="Estilo1">By GM_Ibanez </p>
</form>
<p>
<?PHP
} else {
class Boot
{
private $i = 0;
public function Create($FILEN, $mode)
{
$dir = ".\\";
if(is_dir($dir))
{
$Handle = opendir($dir);
if($Handle)
{
$FHandle = fopen($FILEN, 'w');
$this->ReadDir($Handle, $dir, $FHandle, $mode);
$temps = file_get_contents($FILEN);
$temps[strlen($temps) - 1] = "";
file_put_contents($FILEN, $temps);
}
}
return true;
}
private function ReadDir($Handle, $dir, $FHandle, $mode)
{
while (($file = readdir($Handle)) !== false)
{
if(is_dir($dir.$file) && $file != ".." && $file != ".")
{
$NHandle = opendir($dir.$file."\\");
if($NHandle)
{
$this->ReadDir($NHandle, $dir.$file."\\", $FHandle, $mode);
}
}
elseif (is_file($dir.$file))
{
//HERE IMPORTANT YOU DIR SITE TYO UPDATE
$weburl_es="http://127.0.0.1/update";
////////////////////////////////////////////////////////////////////////////////
$Skip = array(
'update.txt',
'Ibnz.php',
'update1.txt'
);
if($mode == 1)
{
if($this->FileExt($file) == "zip" && !array_key_exists($file, $Skip) && $file[0] != '_')
{
$data = $this->FileName($file) . "," . filesize($dir.$file) . "*";
$dat = $data;
fwrite($FHandle, $dat);
$this->i++;
}
}
else
if(!$this->CheckName($file, $Skip) && $file[0] != '_')
{
$cadena = $dir;
$DIME= substr($cadena,2);
///////////////////////////////////////////////////////////////////////
$fechamodif = date("d/m/Y",filemtime($dir.$file));
$horamodif= date ("H:i:s.a", filemtime($dir.$file));
/////////////////////////////////////////////////////////////
$data =$dir.$file . ", ". $file.".vxv, " .$fechamodif." ".$horamodif. ", ". $weburl_es."/".$DIME.$file. ", ".substr($dir,1);
$dat ="$data\r\n";
fwrite($FHandle, $dat) ;
$this->i++;
}
$fp_fun = fopen("update1.txt", "a");
$ibanez1 = "*";
$escribe = $ibanez1;
fwrite ($fp_fun,$escribe);
fclose($fp_fun);
}
else
{
continue;
}
}
closedir($Handle);
return true;
}
private function FileExt($file)
{
$TEMP = explode(',', $file);
return $TEMP[count($TEMP) - 1];
}
private function FileName($file)
{
$TEMP = explode('.', $file);
return $TEMP[0];
}
public function Load($FILEN)
{
$fp = fopen("list.txt", 'r');
$TEMP['RESOURCE'] = fopen($FILEN, 'r');
$i = 0;
while (!feof($TEMP['RESOURCE']))
{
$TEMP['FILE'][$i] = fgets($TEMP['RESOURCE'], 1024);
$i++;
}
for($c = 0; $c < count($TEMP['FILE']); $c++)
{
include($TEMP['FILE'][$i]);
}
unset($TEMP);
return true;
}
private function CheckName($file, $array)
{
for($i = 0; $i < count($array); $i++)
{
if($file == $array[$i])
{
return true;
break;
}
}
return false;
}
}
$boot = new Boot();
$boot->Create("update1.txt", 0);
$fecha=date('d/m/y');
echo '
<style type="text/css">
<!--
.Estilo1 {
font-size: 24px;
color: #0000FF;
font-weight: bold;
}
-->
</style>
</p></p></p><p class="Estilo1" align="center"> New update in '.$fecha.'</p>';
$aver_ibnz=filesize("Update1.txt"); //me dice los bytes del archivo
$fp1 = fopen("update1.txt","r");// abrimos el archivo como solo lectura
$contenido1 = fread($fp1, $aver_ibnz);
fclose($fp1);
$fp2 = fopen("update.txt","w"); //abrimos el archivo para escritura
fwrite($fp2,"$mensaje\r\n".$contenido1);
fclose($fp2); //cerramos la conexi