pageTitle = 'Botnets'; echo getAdminSideBarLinks().'

'; ////////////////////////////////////////////////////////////////////////////////////// JavascriptFile("/yaamp/ui/js/jquery.metadata.js"); JavascriptFile("/yaamp/ui/js/jquery.tablesorter.widgets.js"); echo << .red { color: darkred; } table.dataGrid { max-width: 99.5%; } table.dataGrid a.red { color: darkred; } end; showTableSorter('maintable', "{ tableClass: 'dataGrid', textExtraction: { 4: function(node, table, n) { return $(node).attr('data'); } }, widgets: ['zebra','Storage','saveSort'], widgetOptions: { saveSort: true } }"); echo << Coin Algo Address Time PID IPs Workers Version Actions end; $botnets = dbolist("SELECT userid, algo, pid, max(time) AS time, count(userid) AS workers, count(DISTINCT ip) AS ips, max(version) AS version ". " FROM workers GROUP BY userid, algo, pid HAVING ips > 10 ORDER BY ips DESC" ); if(!empty($botnets)) foreach($botnets as $botnet) { if (!$botnet['userid']) continue; $user = getdbo('db_accounts', $botnet['userid']); if (!$user) continue; $coin = getdbo('db_coins', $user->coinid); if (!$coin) continue; $coinsym = $coin->symbol; $coinimg = CHtml::image($coin->image, $coin->symbol, array('width'=>'16')); $coinlink = CHtml::link($coin->name, '/site/coin?id='.$coin->id); $d = datetoa2($botnet['time']); echo ''; echo ''.$coinimg.''; echo ''.$coinsym.''; echo ''.$botnet['algo'].''; echo ''.CHtml::link($user->username, '/?address='.$user->username).''; echo ''.$d.''; echo ''.$botnet['pid'].''; echo ''.$botnet['ips'].''; echo ''.$botnet['workers'].''; echo ''.$botnet['version'].''; echo ''; if ($user->logtraffic) echo 'unwatch '; else echo 'watch '; if ($user->is_locked) echo 'unblock '; else echo 'block '; echo 'BAN'; echo ''; echo ''; } echo ''; echo ''; if(empty($botnets)) { echo ''."No botnets detected".''; } echo ''; echo '
';