Changed aesthetical attacker/victim alert table view

Implements #5302
This commit is contained in:
Matteo Biscosi 2021-05-10 11:11:38 +02:00
parent 16da9a3961
commit aaadd8728f
5 changed files with 12 additions and 17 deletions

View file

@ -310,11 +310,11 @@ function flow_alert_store:format_record(value, no_html)
}
if value["is_attacker_to_victim"] == "1" then
attacker = cli_ip
victim = srv_ip
attacker = flow_cli_ip["label"]
victim = flow_srv_ip["label"]
elseif value["is_victim_to_attacker"] == "1" then
attacker = srv_ip
victim = cli_ip
attacker = flow_srv_ip["label"]
victim = flow_cli_ip["label"]
end
record["attacker"] = attacker

View file

@ -163,15 +163,12 @@ function host_alert_store:format_record(value, no_html)
record["alert_name"] = alert_name
if value["is_attacker"] == "1" then
attacker = true
attacker = "Attacker"
elseif value["is_victim"] == "1" then
victim = "Victim"
end
if value["is_victim"] == "1" then
victim = true
end
record["is_attacker"] = attacker
record["is_victim"] = victim
record["is_attacker_or_victim"] = attacker
record["vlan_id"] = value["vlan_id"] or 0
record["msg"] = msg