From fcc93d75d031cfa3341e80e5f21ea565d4b8da8d Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Sun, 14 Aug 2016 17:34:34 +0200 Subject: [PATCH] adblock: update 1.4.4 * filter non-printable characters/binary data in input stream * fix IPv4 adblock statistics in CC Signed-off-by: Dirk Brenken --- net/adblock/Makefile | 2 +- net/adblock/files/adblock-helper.sh | 2 +- net/adblock/files/adblock-update.sh | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/adblock/Makefile b/net/adblock/Makefile index 34c97053c..d5e84c13a 100644 --- a/net/adblock/Makefile +++ b/net/adblock/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=adblock -PKG_VERSION:=1.4.3 +PKG_VERSION:=1.4.4 PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0+ PKG_MAINTAINER:=Dirk Brenken diff --git a/net/adblock/files/adblock-helper.sh b/net/adblock/files/adblock-helper.sh index 233707c3a..88ad5e818 100644 --- a/net/adblock/files/adblock-helper.sh +++ b/net/adblock/files/adblock-helper.sh @@ -686,7 +686,7 @@ f_statistics() if [ -n "${adb_wanif4}" ] then ipv4_blk="$(iptables -t nat -vxnL adb-nat | awk '$3 ~ /^DNAT$/ {sum += $1} END {printf sum}')" - ipv4_all="$(iptables -t nat -vxnL PREROUTING | awk '$3 ~ /^prerouting_rule$/ {sum += $1} END {printf sum}')" + ipv4_all="$(iptables -t nat -vxnL PREROUTING | awk '$3 ~ /^(delegate_prerouting|prerouting_rule)$/ {sum += $1} END {printf sum}')" if [ $((ipv4_all)) -gt 0 ] && [ $((ipv4_blk)) -gt 0 ] && [ $((ipv4_all)) -gt $((ipv4_blk)) ] then ipv4_pct="$(printf "${ipv4_blk}" | awk -v all="${ipv4_all}" '{printf( "%5.2f\n",$1/all*100)}')" diff --git a/net/adblock/files/adblock-update.sh b/net/adblock/files/adblock-update.sh index 41a4a7170..0afd9b5b2 100755 --- a/net/adblock/files/adblock-update.sh +++ b/net/adblock/files/adblock-update.sh @@ -10,7 +10,7 @@ # adb_pid="${$}" adb_pidfile="/var/run/adblock.pid" -adb_scriptver="1.4.3" +adb_scriptver="1.4.4" adb_mincfgver="2.3" adb_scriptdir="${0%/*}" if [ -r "${adb_pidfile}" ] @@ -97,7 +97,7 @@ do then if [ "${src_name}" = "blacklist" ] then - tmp_domains="$(cat "${url}")" + tmp_domains="$(cat "${url}" | strings -n 1)" elif [ "${src_name}" = "shalla" ] then shalla_archive="${adb_tmpdir}/shallalist.tar.gz" @@ -117,13 +117,13 @@ do break fi done - tmp_domains="$(cat "${shalla_file}")" + tmp_domains="$(cat "${shalla_file}" | strings -n 1)" rm -rf "${adb_tmpdir}/BL" rm -f "${shalla_archive}" rm -f "${shalla_file}" fi else - tmp_domains="$(${adb_fetch} ${fetch_parm} -O- "${url}")" + tmp_domains="$(${adb_fetch} ${fetch_parm} -O- "${url}" | strings -n 1)" fi rc=${?} else