summaryrefslogtreecommitdiffstats
path: root/snort-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'snort-model.lua')
-rw-r--r--snort-model.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/snort-model.lua b/snort-model.lua
index da6d803..b4b3266 100644
--- a/snort-model.lua
+++ b/snort-model.lua
@@ -108,6 +108,13 @@ read_alert = function ()
end
end
end
- return alertcount,alertpriority
+ --Start sorting priority-table
+ local sorted_table = {}
+ for n in pairs(alertpriority) do
+ table.insert(sorted_table, {name=n, value=alertpriority[n]})
+ end
+ table.sort(sorted_table, function(a,b) return (a.name < b.name) end)
+
+ return alertcount,sorted_table
end