ruantiblock-mod-lua, ruantiblock-mod-py: fixed rublacklist

This commit is contained in:
gSpot
2023-08-31 19:08:27 +03:00
parent 0180097831
commit e5c4638774
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ LUCI_APP=1
OWRT_VERSION="current"
RUAB_VERSION="0.9.7-1"
RUAB_MOD_LUA_VERSION="0.9.7-0"
RUAB_MOD_LUA_VERSION="0.9.7-1"
RUAB_LUCI_APP_VERSION="0.9.7-0"
BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master"
PKG_DIR="/tmp"
+1 -1
View File
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ruantiblock-mod-lua
PKG_VERSION:=0.9.7
PKG_RELEASE:=0
PKG_RELEASE:=1
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/ruantiblock_openwrt>
include $(INCLUDE_DIR)/package.mk
@@ -513,14 +513,14 @@ end
local Rbl = Class(BlackListParser, {
url = Config.RBL_ALL_URL,
records_separator = '%{"authority": ',
records_separator = '%{"appearDate": ',
ips_separator = ", ",
})
function Rbl:sink()
return function(chunk)
if chunk and chunk ~= "" then
for fqdn_str, ip_str in chunk:gmatch('"domains": %["?(.-)"?%].-"ips": %[([a-f0-9/.:", ]*)%].-' .. self.records_separator .. "?") do
for fqdn_str, ip_str in chunk:gmatch('"domains": %["?(.-)"?%].-"ips": %[([a-f0-9/.:", ]*)%].-') do
fqdn_sink_func(self, ip_str, fqdn_str)
end
end
+1 -1
View File
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ruantiblock-mod-py
PKG_VERSION:=0.9.7
PKG_RELEASE:=0
PKG_RELEASE:=1
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/ruantiblock_openwrt>
include $(INCLUDE_DIR)/package.mk
@@ -376,7 +376,7 @@ class RblFQDN(BlackListParser):
def __init__(self):
super().__init__()
self.url = self.RBL_ALL_URL
self.records_separator = '{"authority": '
self.records_separator = '{"appearDate": '
self.ips_separator = ", "
def parser_func(self):