Author: yoann
Date: 2009-04-06 18:47:04 +0200 (Mon, 06 Apr 2009)
New Revision: 11122
Modified:
prelude-correlator/trunk/plugins/lua/ruleset/dshield.lua
Log:
Use local.
Modified: prelude-correlator/trunk/plugins/lua/ruleset/dshield.lua
===================================================================
--- prelude-correlator/trunk/plugins/lua/ruleset/dshield.lua 2009-04-06 14:23:31 UTC (rev 11121)
+++ prelude-correlator/trunk/plugins/lua/ruleset/dshield.lua 2009-04-06 16:47:04 UTC (rev 11122)
@@ -26,9 +26,8 @@
function load_dshield_data(fname, attr)
local cnt = 0
local iphash = {}
+ local fd = io.input(fname)
- fd = io.input(fname)
-
for line in fd:lines() do
if not string.find(line,"^#") then
val = string.split(line, "\t")
@@ -54,10 +53,10 @@
end
info("Downloading host list from dshield, this might take some time...")
- body = http.request(DSHIELD_URL)
+ local body = http.request(DSHIELD_URL)
info("Downloading done, processing data.")
- fd = io.output(fname)
+ local fd = io.output(fname)
fd:write(body)
fd:close(body)
@@ -69,7 +68,7 @@
function normalize_ip(ipaddr)
- quads = string.split(ipaddr, ".")
+ local quads = string.split(ipaddr, ".")
return string.format("%.3d.%.3d.%.3d.%.3d", quads[1], quads[2], quads[3], quads[4])
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.