From 2cc7cf3ca0aa6ad2cf5d67a66632ca5a516eb07b Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Tue, 18 Jun 2024 17:03:23 +0200 Subject: [PATCH] banip: update 1.0.0-3 * fixed a regression in the split Set function (reported in the forum) * fixed regex for urlhaus feed Signed-off-by: Dirk Brenken --- net/banip/Makefile | 2 +- net/banip/files/banip-functions.sh | 3 +-- net/banip/files/banip.feeds | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/net/banip/Makefile b/net/banip/Makefile index 866cfdd43c..5c008601f9 100644 --- a/net/banip/Makefile +++ b/net/banip/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=banip PKG_VERSION:=1.0.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken diff --git a/net/banip/files/banip-functions.sh b/net/banip/files/banip-functions.sh index 76c2444b12..cf83913bb4 100644 --- a/net/banip/files/banip-functions.sh +++ b/net/banip/files/banip-functions.sh @@ -1048,8 +1048,7 @@ f_down() { # split Sets # if [ "${feed_rc}" = "0" ]; then - if [ -n "${ban_splitsize//[![:digit:]]/}" ]; then - [ "${ban_splitsize//[![:digit:]]/}" -lt "512" ] && ban_splitsize="512" + if [ -n "${ban_splitsize//[![:digit:]]/}" ] && [ "${ban_splitsize//[![:digit:]]/}" -ge "512" ]; then if ! "${ban_awkcmd}" "NR%${ban_splitsize//[![:digit:]]/}==1{file=\"${tmp_file}.\"++i;}{ORS=\" \";print > file}" "${tmp_split}" 2>/dev/null; then feed_rc="${?}" rm -f "${tmp_file}".* diff --git a/net/banip/files/banip.feeds b/net/banip/files/banip.feeds index 2d05563e21..a135230360 100644 --- a/net/banip/files/banip.feeds +++ b/net/banip/files/banip.feeds @@ -277,7 +277,7 @@ }, "urlhaus":{ "url_4": "https://urlhaus.abuse.ch/downloads/ids/", - "rule_4": "match($0,/content:\"127\\./{next}/(content:\"([1-9][0-9]{0,2}\\.){1}([0-9]{1,3}\\.){2}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5]))/){printf \"%s,\\n\",substr($0,RSTART+9,RLENGTH-9)}", + "rule_4": "BEGIN{FS=\";\"}/content:\"127\\./{next}/(content:\"([1-9][0-9]{0,2}\\.){1}([0-9]{1,3}\\.){2}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5]))/{printf \"%s,\\n\",substr($10,11,length($10)-11)}", "descr": "urlhaus IDS IPs" }, "urlvir":{ -- 2.30.2