r11112 - in prelude-correlator/trunk/plugins/lua: . ruleset

[email protected]
Newsgroups gmane.comp.security.ids.prelude.cvs
Message-ID <[email protected]>
Author: yoann
Date: 2009-04-03 16:45:20 +0200 (Fri, 03 Apr 2009)
New Revision: 11112

Modified:
   prelude-correlator/trunk/plugins/lua/lib.lua
   prelude-correlator/trunk/plugins/lua/ruleset/scan.lua
Log:
Rename table_lookup to table.find
Rename table_dump to table.dump

Modified: prelude-correlator/trunk/plugins/lua/lib.lua
===================================================================
--- prelude-correlator/trunk/plugins/lua/lib.lua	2009-04-03 14:45:16 UTC (rev 11111)
+++ prelude-correlator/trunk/plugins/lua/lib.lua	2009-04-03 14:45:20 UTC (rev 11112)
@@ -107,7 +107,7 @@
 
 -- Utility function
 --
-function _table_dump(depth, result)
+function _table.dump(depth, result)
    for i,v in pairs(result) do
         if type(v) == "table" then
                 for x=0,depth-1 do io.write("\t") end io.write(i, " table") print(":")
@@ -119,10 +119,10 @@
 end
 
 
-function table_dump(result)
+function table.dump(result)
     print "***********************"
     if result then
-        _table_dump(0, result)
+        _table.dump(0, result)
     else
         print("table is nil")
     end
@@ -130,7 +130,7 @@
 end
 
 
-function table_lookup(list, what)
+function table.find(list, what)
     for key, value in ipairs(list) do
         if value == what then
             return true

Modified: prelude-correlator/trunk/plugins/lua/ruleset/scan.lua
===================================================================
--- prelude-correlator/trunk/plugins/lua/ruleset/scan.lua	2009-04-03 14:45:16 UTC (rev 11111)
+++ prelude-correlator/trunk/plugins/lua/ruleset/scan.lua	2009-04-03 14:45:20 UTC (rev 11112)
@@ -65,7 +65,7 @@
         cur = ctx:getIDMEF("alert.target(*).node.address(*).address")
         if cur then
             for i, address in ipairs(target) do
-                if table_lookup(cur, address) then
+                if table.find(cur, address) then
                     insert = false
                     break
                 end

_______________________________________________
Prelude-cvslog site list
[email protected]
http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.