mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-04-29 15:39:42 +00:00
Changed output for the sharkfest lua scripts
This commit is contained in:
parent
6704649a75
commit
a01a2b7443
4 changed files with 180 additions and 19 deletions
|
|
@ -24,7 +24,7 @@ end
|
|||
--############################################
|
||||
|
||||
local function processResponse(http_table, req_or_rep, src, dst)
|
||||
local key = src .. "->" .. dst
|
||||
local key = src .. " -> " .. dst
|
||||
|
||||
-- Create the table entry if needed
|
||||
if not http_table[key] then
|
||||
|
|
@ -120,13 +120,13 @@ local function httpReqRepRatio()
|
|||
end
|
||||
|
||||
if #dangerous_flows > 0 then
|
||||
tw:append("------------- DETECTED HTTP REQUEST/REPLY RATIO -------------\n")
|
||||
tw:append("------------- TOT SUSPICIOUS FLOWS DETECTED: " .. #dangerous_flows .. " -------------\n")
|
||||
tw:append("------------- DETECTED HTTP REQUEST/REPLY RATIO -------------\n\n")
|
||||
tw:append("TOT SUSPICIOUS FLOWS DETECTED:\t" .. #dangerous_flows .. " -------------\n")
|
||||
else
|
||||
tw:append("------------- HTTP REQUEST/REPLY RATIO SEEMS FINE -------------\n")
|
||||
tw:append("------------- HTTP REQUEST/REPLY RATIO SEEMS FINE -------------\n\n")
|
||||
end
|
||||
|
||||
tw:append("------------- TOTAL HTTP FLOWS DETECTED: " .. #dangerous_flows + #ok_flows .. " -------------\n\n")
|
||||
tw:append("TOTAL HTTP FLOWS DETECTED:\t\t" .. #dangerous_flows + #ok_flows .. " -------------\n\n")
|
||||
|
||||
for _, data in pairs(dangerous_flows) do
|
||||
local flow = data["flow"]
|
||||
|
|
@ -134,7 +134,7 @@ local function httpReqRepRatio()
|
|||
local replies = data["replies"]
|
||||
local ratio = data["ratio"]
|
||||
|
||||
tw:append(flow .. ":\n\tRatio: " .. (ratio) .. "\n\tRequests: " .. requests .. "\n\tReplies: " .. replies .. "\n\n");
|
||||
tw:append(flow .. ":\n\tRatio:\t\t" .. (ratio) .. "\n\tRequests:\t\t" .. requests .. "\n\tReplies:\t\t" .. replies .. "\n\n");
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue