Skip to content
Snippets Groups Projects
Commit 19a260eb authored by root's avatar root
Browse files

test spatneho posilani

parent 8036f767
No related branches found
No related tags found
No related merge requests found
<?php
include("db.php");
$q = "SELECT
hostname,
service,
MAX(received) as last_received,
COUNT(*) as count
FROM events
WHERE
detected > '2012-08-01' and
type NOT IN ('portscan', 'bruteforce', 'probe', 'spam','phishing', 'botnet_c_c', 'dos', 'malware', 'copyright','webattack', 'test', 'other')
GROUP BY hostname, service;";
$res = mysql_query($q, $db);
if (mysql_num_rows($res) == 0) { die("nodata");}
$d = array();
while ($tmp = mysql_fetch_assoc($res)) {
print json_encode(view_recode($tmp))."\n";
}
mysql_free_result($res);
mysql_close($db);
?>
......@@ -11,6 +11,7 @@ if(!empty($_SERVER["REMOTE_ADDR"])) {
"show_TargetportActivity.php" => "show_TargetportActivity.php",
"show_HostnameServiceTypeActivity.php" => "show_HostnameServiceTypeActivity.php",
"show_MartiansActivity.php" => "show_MartiansActivity.php",
"show_WrongType.php" => "show_WrongType.php",
"TopTargetports" => "show_TopTargetports.html",
"TopSources" => "table_TopSources.html",
"dropmaps" => "stats.php?c=dropmaps",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment