Файл: explorer.mhos.tk/explode.php
Строк: 78
<?php
error_reporting(0);
$server=rawurldecode(trim($_GET['server'])); $login=rawurldecode(trim($_GET['login']));
$pass=rawurldecode(trim($_GET['pass'])); $d=rawurldecode(trim($_GET['d']));
include_once("cnfg.php");
include "includes/header.php";
if (($server==NULL)||($login==NULL)) {
if ($server==NULL) {$server="ftp.";}
echo '<div class="box_1">
<form action="explode.php" method="get">
<b>Сервер:</b><br/>
<input name="server" type="text" maxlength="250" size="16" value="'.$server.'"/><br/>
<b>Логин:</b><br/>
<input name="login" type="text" maxlength="250" size="16" value="'.$login.'"/><br/>
<b>Пароль:</b><br/>
<input name="pass" type="password" maxlength="250" size="16" value="'.$pass.'"/><br/>
<b>Перейти в папку:</b><br/>
<input name="d" type="text" maxlength="250" size="16" value="/"/><br/>
<b>Объектов на странице:</b><br/>
<select name="v">
<option value="10" '.($v==10?" selected='selected'":null).'>10</option>
<option value="20" '.($v==20?" selected='selected'":null).'>20</option>
<option value="30" '.($v==30?" selected='selected'":null).'>30</option>
<option value="45" '.($v==45?" selected='selected'":null).'>45</option>
<option value="60" '.($v==60?" selected='selected'":null).'>60</option>
<option value="80" '.($v==80?" selected='selected'":null).'>80</option>
<option value="100" '.($v==100?" selected='selected'":null).'>100</option>
</select><br/>
<input type="checkbox" name="s" value="1" '.($s==1?" checked='checked'":null).'/><b>Показывать вес файлов</b><br/>
<input type="checkbox" name="i" value="1" '.($i==1?" checked='checked'":null).'/><b>Включить иконки</b><br/>
<input type="submit" value="Войти"></form></div>';
include "includes/footer.php";
mysql_close();
} else {
$arr=array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F",
"G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y",
"Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r",
"s","t","u","v","w","x","y","z");
$key=$arr[rand(0,61)].$arr[rand(0,61)].$arr[rand(0,61)].$arr[rand(0,61)].$arr[rand(0,61)].$arr[rand(0,61)].$arr[rand(0,61)];
$repl=array("^"=>""); $time=time(); $server=strtolower(trim(strtr($server,$repl)));
$login=trim(strtr($login,$repl)); $pass=trim(strtr($pass,$repl));
$v=trim($_GET['v']); if ($v==NULL) {$v=20;} elseif (($v<10)||($v>100)) {$v=20;}
$s=trim($_GET['s']); if ($s==1) {$sz=1;} else {$sz=0;}
$i=trim($_GET['i']); if ($i==1) {$ib=1;} else {$ib=0;}
$str=$key."^$server^$login^$pass^$v^$time^$sz^$ibrn"; $fl=@file("userkeys.dat");
if ($fl<>NULL) {
for ($i=0;$i<count($fl);$i++) {
list($p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8)=split('^',trim($fl[$i]));
if ($p1==$key) {
header("Location: $dftp/explode.php?server=$server&login=$login&pass=$pass"); exit;
}
if (($time-$p6<2700)&&($p2<>$server)&&($p3<>$login)) {$str.=$fl[$i];}
else {
include_once("freedata.php"); freedata($p1);
}
}
}
$f=@fopen("userkeys.dat","w"); @fwrite($f,$str); @fclose($f);
$dir=""; if (($d<>NULL)&&($d<>"/")) {$dir="&d=".rawurlencode($d);}
$dir=str_replace(".htaccess",".|htaccess",$dir);
header("Location: $dftp/ftp.php?k=$key$dir"); exit;
}
?>