mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Revamped host categorization and moved to Google Safe Browsing for detecting safe and malware sites
This commit is contained in:
parent
258aa76714
commit
e2b04d128f
15 changed files with 192 additions and 423 deletions
|
|
@ -330,10 +330,6 @@ for key, value in pairs(flows_stats) do
|
|||
else
|
||||
vkey = postfix
|
||||
end
|
||||
elseif(sortColumn == "column_category") then
|
||||
c = flows_stats[key]["category"]
|
||||
if(c == nil) then c = "" end
|
||||
vkey = c..postfix
|
||||
elseif(sortColumn == "column_duration") then
|
||||
vkey = flows_stats[key]["duration"]+postfix
|
||||
elseif(sortColumn == "column_thpt") then
|
||||
|
|
@ -469,10 +465,8 @@ for _key, _value in pairsByKeys(vals, funct) do
|
|||
print("\", \"column_vlan\" : \"\"")
|
||||
end
|
||||
|
||||
if(value["category"] ~= nil) then print (", \"column_category\" : \"" .. getCategory(value["category"])) else print (",") end
|
||||
-- if (debug) then io.write(value["category"].."[" .. getCategory(value["category"]).. "]\n") end
|
||||
print ("\"column_proto_l4\" : \"")
|
||||
|
||||
-- if(value["category"] ~= nil) then print (", \"column_category\" : \"" .. value["category"] .. "\", ") else print (",") end
|
||||
print (", \"column_proto_l4\" : \"")
|
||||
|
||||
if(value["tcp.seq_problems"] == true) then
|
||||
print("<font color=#B94A48>"..value["proto.l4"].."</font>")
|
||||
|
|
@ -527,7 +521,13 @@ for _key, _value in pairsByKeys(vals, funct) do
|
|||
cli2srv = round((value["cli2srv.bytes"] * 100) / value["bytes"], 0)
|
||||
print (", \"column_breakdown\" : \"<div class='progress'><div class='progress-bar progress-bar-warning' style='width: " .. cli2srv .."%;'>Client</div><div class='progress-bar progress-bar-info' style='width: " .. (100-cli2srv) .. "%;'>Server</div></div>")
|
||||
|
||||
print ("\", \"column_info\" : \"".. value["info"] .. "\" }\n")
|
||||
print ("\", \"column_info\" : \"".. value["info"])
|
||||
|
||||
if(value["category"] ~= "") then
|
||||
print(" ".. getCategoryIcon(value["info"], value["category"]))
|
||||
end
|
||||
|
||||
print(" \" }\n")
|
||||
|
||||
num = num + 1
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue