mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 16:30:10 +00:00
Reduced length of suspicious dga domain (#5804)
This commit is contained in:
parent
954f68a5c9
commit
b82cbe76c9
3 changed files with 14 additions and 8 deletions
|
|
@ -42,17 +42,23 @@ end
|
|||
-- #######################################################
|
||||
|
||||
function alert_ndpi_suspicious_dga_domain.format(ifid, alert, alert_type_params)
|
||||
local domain = ''
|
||||
local domain = alert_type_params.dga_domain
|
||||
local href = ''
|
||||
local info = ''
|
||||
|
||||
if not isEmptyString(alert_type_params.dga_domain) then
|
||||
domain = string.format("[%s]", alert_type_params.dga_domain)
|
||||
if string.len(domain) > 64 then
|
||||
domain = shortenString(alert_type_params.dga_domain, 64)
|
||||
info = '<i class="fas fa-question-circle" data-bs-toggle="tooltip" data-bs-placement="bottom" title="'..alert_type_params.dga_domain..'"></i>'
|
||||
end
|
||||
|
||||
if not isEmptyString(domain) then
|
||||
href = '<a class="ntopng-external-link fa-sm" href= http://' .. alert_type_params.dga_domain .. ' ><i class="fas fa-external-link-alt fa-lg"></i></a>'
|
||||
end
|
||||
|
||||
return i18n("alert_messages.suspicious_dga_domain", {
|
||||
domain = domain,
|
||||
href = href,
|
||||
domain = domain,
|
||||
href = href,
|
||||
info = info,
|
||||
})
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ function alert_suspicious_file_transfer.format(ifid, alert, alert_type_params)
|
|||
type_icon = '<i class="fas fa-fw fa-file-image"></i>'
|
||||
end
|
||||
|
||||
if string.len(url) > 128 then
|
||||
url = shortenString(alert_type_params["protos.http.last_url"], 128)
|
||||
if string.len(url) > 64 then
|
||||
url = shortenString(alert_type_params["protos.http.last_url"], 64)
|
||||
info = '<i class="fas fa-question-circle" data-bs-toggle="tooltip" data-bs-placement="bottom" title="'..alert_type_params["protos.http.last_url"]..'"></i>'
|
||||
end
|
||||
res = i18n("alerts_dashboard.suspicious_file_transfer_url", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue