adblock: update 4.1.5-9
authorRISCi_ATOM <bob@bobcall.me>
Wed, 5 Jun 2024 22:15:18 +0000 (18:15 -0400)
committerRISCi_ATOM <bob@bobcall.me>
Wed, 5 Jun 2024 22:15:18 +0000 (18:15 -0400)
package/network/config/adblock/Makefile
package/network/config/adblock/files/adblock.sh

index 0e11de10506f84d5180e9d274eebe4a54b39a035..5d30ae44ee93c3c59c3eab832a10790d39edde16 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015-2023 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2015-2024 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 #
 
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
 PKG_VERSION:=4.1.5
-PKG_RELEASE:=8
+PKG_RELEASE:=9
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index e76e81450703d997d78e2da6ac6ec341d578b690..5a28ec7b0a66be2541411b7b8be4a55f8923f2ac 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # dns based ad/abuse domain blocking
-# Copyright (c) 2015-2023 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2015-2024 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # disable (s)hellcheck in release
@@ -1304,9 +1304,15 @@ f_report() {
                [ "${adb_represolve}" = "1" ] && resolve=""
                for file in "${adb_reportdir}/adb_report.pcap"*; do
                        (
-                               "${adb_dumpcmd}" "${resolve}" -tttt -r "${file}" 2>/dev/null |
-                                       "${adb_awk}" -v cnt="${cnt}" '!/\.lan\. |PTR\? | SOA\? /&&/ A[\? ]+|NXDomain|0\.0\.0\.0/{a=$1;b=substr($2,0,8);c=$4;sub(/\.[0-9]+$/,"",c);gsub(/[^[:alnum:]\.:-]/,"",c);d=cnt $7;sub(/\*$/,"",d);
-                                       e=$(NF-1);sub(/[0-9]\/[0-9]\/[0-9]|0\.0\.0\.0/,"NX",e);sub(/\.$/,"",e);sub(/([0-9]{1,3}\.){3}[0-9]{1,3}/,"OK",e);gsub(/[^[:alnum:]\.-]/,"",e);if(e==""){e="err"};printf "%s\t%s\t%s\t%s\t%s\n",d,e,a,b,c}' >>"${report_raw}"
+                               if [ "${adb_repiface}" = "any" ]; then
+                                       "${adb_dumpcmd}" "${resolve}" -tttt -r "${file}" 2>/dev/null |
+                                               "${adb_awk}" -v cnt="${cnt}" '!/\.lan\. |PTR\? | SOA\? /&&/ A[\? ]+|NXDomain|0\.0\.0\.0/{a=$1;b=substr($2,0,8);c=$6;sub(/\.[0-9]+$/,"",c);gsub(/[^[:alnum:]\.:-]/,"",c);d=cnt $9;sub(/\*$/,"",d);
+                                               e=$(NF-1);sub(/[0-9]\/[0-9]\/[0-9]|0\.0\.0\.0/,"NX",e);sub(/\.$/,"",e);sub(/([0-9]{1,3}\.){3}[0-9]{1,3}/,"OK",e);gsub(/[^[:alnum:]\.-]/,"",e);if(e==""){e="err"};printf "%s\t%s\t%s\t%s\t%s\n",d,e,a,b,c}' >>"${report_raw}"
+                               else
+                                       "${adb_dumpcmd}" "${resolve}" -tttt -r "${file}" 2>/dev/null |
+                                               "${adb_awk}" -v cnt="${cnt}" '!/\.lan\. |PTR\? | SOA\? /&&/ A[\? ]+|NXDomain|0\.0\.0\.0/{a=$1;b=substr($2,0,8);c=$4;sub(/\.[0-9]+$/,"",c);gsub(/[^[:alnum:]\.:-]/,"",c);d=cnt $7;sub(/\*$/,"",d);
+                                               e=$(NF-1);sub(/[0-9]\/[0-9]\/[0-9]|0\.0\.0\.0/,"NX",e);sub(/\.$/,"",e);sub(/([0-9]{1,3}\.){3}[0-9]{1,3}/,"OK",e);gsub(/[^[:alnum:]\.-]/,"",e);if(e==""){e="err"};printf "%s\t%s\t%s\t%s\t%s\n",d,e,a,b,c}' >>"${report_raw}"
+                               fi
                        ) &
                        hold="$((cnt % adb_cores))"
                        [ "${hold}" = "0" ] && wait