mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 17:00:10 +00:00
Updated geolocation (fixed warning)
Updated blacklist URL
This commit is contained in:
parent
8edef5df25
commit
4622ba92cd
2 changed files with 8 additions and 7 deletions
|
|
@ -7,7 +7,7 @@
|
|||
local blacklist_utils = {}
|
||||
|
||||
local blacklistURLs = {
|
||||
"https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt"
|
||||
"http://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt"
|
||||
}
|
||||
|
||||
-- ##################################################################
|
||||
|
|
@ -15,11 +15,11 @@ local blacklistURLs = {
|
|||
local function loadBlackListFromURL(url)
|
||||
local resp = ntop.httpGet(url)
|
||||
|
||||
if(resp ~= nil) then
|
||||
if((resp ~= nil) and (resp["CONTENT"] ~= nil)) then
|
||||
local content = resp["CONTENT"]
|
||||
local line
|
||||
local lines = string.split(content, "\n")
|
||||
|
||||
|
||||
for _,line in pairs(lines) do
|
||||
line = trimSpace(line)
|
||||
if((string.len(line) > 0) and not(string.starts(line, "#"))) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue