banip: update 1.0.0-3
authorDirk Brenken <[email protected]>
Tue, 18 Jun 2024 15:03:23 +0000 (17:03 +0200)
committerDirk Brenken <[email protected]>
Tue, 18 Jun 2024 15:04:15 +0000 (17:04 +0200)
* fixed a regression in the split Set function (reported in the forum)
* fixed regex for urlhaus feed

Signed-off-by: Dirk Brenken <[email protected]>
net/banip/Makefile
net/banip/files/banip-functions.sh
net/banip/files/banip.feeds

index 866cfdd43c0af75b83efd5b0da6f600ab64325ce..5c008601f9b32dfc8fdc2fe41dc3e99204692ca7 100644 (file)
@@ -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 <[email protected]>
 
index 76c2444b1269774e666098f1a16da0b2a1be39ef..cf83913bb491f59b92ca44b605e7820884bb4db4 100644 (file)
@@ -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}".*
index 2d05563e2141f9c2df292f2d46804f3a0ac81f46..a135230360e669bb8d056c8a7713e658d1420bd1 100644 (file)
        },
        "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":{