Browse Source

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 <dev@brenken.org>
lilik-openwrt-22.03
Dirk Brenken 8 years ago
parent
commit
fcc93d75d0
3 changed files with 6 additions and 6 deletions
  1. +1
    -1
      net/adblock/Makefile
  2. +1
    -1
      net/adblock/files/adblock-helper.sh
  3. +4
    -4
      net/adblock/files/adblock-update.sh

+ 1
- 1
net/adblock/Makefile View File

@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=adblock PKG_NAME:=adblock
PKG_VERSION:=1.4.3
PKG_VERSION:=1.4.4
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+ PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org> PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>


+ 1
- 1
net/adblock/files/adblock-helper.sh View File

@ -686,7 +686,7 @@ f_statistics()
if [ -n "${adb_wanif4}" ] if [ -n "${adb_wanif4}" ]
then then
ipv4_blk="$(iptables -t nat -vxnL adb-nat | awk '$3 ~ /^DNAT$/ {sum += $1} END {printf sum}')" 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)) ] if [ $((ipv4_all)) -gt 0 ] && [ $((ipv4_blk)) -gt 0 ] && [ $((ipv4_all)) -gt $((ipv4_blk)) ]
then then
ipv4_pct="$(printf "${ipv4_blk}" | awk -v all="${ipv4_all}" '{printf( "%5.2f\n",$1/all*100)}')" ipv4_pct="$(printf "${ipv4_blk}" | awk -v all="${ipv4_all}" '{printf( "%5.2f\n",$1/all*100)}')"


+ 4
- 4
net/adblock/files/adblock-update.sh View File

@ -10,7 +10,7 @@
# #
adb_pid="${$}" adb_pid="${$}"
adb_pidfile="/var/run/adblock.pid" adb_pidfile="/var/run/adblock.pid"
adb_scriptver="1.4.3"
adb_scriptver="1.4.4"
adb_mincfgver="2.3" adb_mincfgver="2.3"
adb_scriptdir="${0%/*}" adb_scriptdir="${0%/*}"
if [ -r "${adb_pidfile}" ] if [ -r "${adb_pidfile}" ]
@ -97,7 +97,7 @@ do
then then
if [ "${src_name}" = "blacklist" ] if [ "${src_name}" = "blacklist" ]
then then
tmp_domains="$(cat "${url}")"
tmp_domains="$(cat "${url}" | strings -n 1)"
elif [ "${src_name}" = "shalla" ] elif [ "${src_name}" = "shalla" ]
then then
shalla_archive="${adb_tmpdir}/shallalist.tar.gz" shalla_archive="${adb_tmpdir}/shallalist.tar.gz"
@ -117,13 +117,13 @@ do
break break
fi fi
done done
tmp_domains="$(cat "${shalla_file}")"
tmp_domains="$(cat "${shalla_file}" | strings -n 1)"
rm -rf "${adb_tmpdir}/BL" rm -rf "${adb_tmpdir}/BL"
rm -f "${shalla_archive}" rm -f "${shalla_archive}"
rm -f "${shalla_file}" rm -f "${shalla_file}"
fi fi
else else
tmp_domains="$(${adb_fetch} ${fetch_parm} -O- "${url}")"
tmp_domains="$(${adb_fetch} ${fetch_parm} -O- "${url}" | strings -n 1)"
fi fi
rc=${?} rc=${?}
else else


Loading…
Cancel
Save