From b5087d91761709050824931981a092839f65633b Mon Sep 17 00:00:00 2001 From: RISCi_ATOM Date: Wed, 5 Jun 2024 18:15:18 -0400 Subject: [PATCH] adblock: update 4.1.5-9 --- package/network/config/adblock/Makefile | 4 ++-- package/network/config/adblock/files/adblock.sh | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/package/network/config/adblock/Makefile b/package/network/config/adblock/Makefile index 0e11de1050..5d30ae44ee 100644 --- a/package/network/config/adblock/Makefile +++ b/package/network/config/adblock/Makefile @@ -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 diff --git a/package/network/config/adblock/files/adblock.sh b/package/network/config/adblock/files/adblock.sh index e76e814507..5a28ec7b0a 100755 --- a/package/network/config/adblock/files/adblock.sh +++ b/package/network/config/adblock/files/adblock.sh @@ -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 -- 2.25.1