| android_tracking | | S | tracking | [Link](https://github.com/Perflyst/PiHoleBlocklist) |
| andryou | | L | compilation | [Link](https://gitlab.com/andryou/block/-/blob/master/readme.md) |
| anti_ad | | L | compilation | [Link](https://github.com/privacy-protection-tools/anti-AD/blob/master/README.md) |
-| antipopads | | L | compilation | [Link](https://github.com/AdroitAdorKhan/antipopads-re) |
| anudeep | | M | compilation | [Link](https://github.com/anudeepND/blacklist) |
| bitcoin | | S | mining | [Link](https://github.com/hoshsadiq/adblock-nocoin-list) |
| certpl | | L | phishing | [Link](https://cert.pl/en/warning-list/) |
| doh_blocklist | | S | doh_server | [Link](https://github.com/dibdot/DoH-IP-blocklists) |
| easylist | | M | compilation | [Link](https://easylist.to) |
| easyprivacy | | M | tracking | [Link](https://easylist.to) |
+| energized_blu | | XL | compilation | [Link](https://energized.pro) |
+| energized_spark | | L | compilation | [Link](https://energized.pro) |
+| energized_ultimate | | XXL | compilation | [Link](https://energized.pro) |
| firetv_tracking | | S | tracking | [Link](https://github.com/Perflyst/PiHoleBlocklist) |
| games_tracking | | S | tracking | [Link](https://www.gameindustry.eu) |
| hagezi | | VAR | compilation | [Link](https://github.com/hagezi/dns-blocklists) |
else
"${adb_catcmd}" "${adb_tmpdir}/tmp.raw.${src_name}" >"${adb_tmpdir}/tmp.deduplicate.${src_name}"
fi
- "${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${adb_tmpdir}/tmp.deduplicate.${src_name}" >"${adb_tmpdir}/tmp.raw.${src_name}"
- "${adb_sortcmd}" ${adb_srtopts} -u "${adb_tmpdir}/tmp.raw.${src_name}" 2>/dev/null >"${file_name}"
- out_rc="${?}"
+ if [ "${adb_tld}" = "1" ]; then
+ "${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${adb_tmpdir}/tmp.deduplicate.${src_name}" |
+ "${adb_sortcmd}" ${adb_srtopts} -u >"${file_name}"
+ out_rc="${?}"
+ else
+ "${adb_sortcmd}" ${adb_srtopts} -u "${adb_tmpdir}/tmp.deduplicate.${src_name}" 2>/dev/null >"${file_name}"
+ out_rc="${?}"
+ fi
fi
;;
"whitelist")
for file in "${adb_backupdir}/${adb_dnsprefix}".*.gz "${adb_blacklist}" "${adb_whitelist}"; do
suffix="${file##*.}"
if [ "${suffix}" = "gz" ]; then
- "${adb_zcatcmd}" "${file}" 2>/dev/null |
- "${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' | "${adb_awkcmd}" -v f="${file##*/}" "BEGIN{rc=1};/^($search|.*\\.${search})$/{i++;if(i<=3){printf \" + %-30s%s\n\",f,\$1;rc=0}else if(i==4){printf \" + %-30s%s\n\",f,\"[...]\"}};END{exit rc}"
+ if [ "${adb_tld}" = "1" ]; then
+ "${adb_zcatcmd}" "${file}" 2>/dev/null |
+ "${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' |
+ "${adb_awkcmd}" -v f="${file##*/}" "BEGIN{rc=1};/^($search|.*\\.${search})$/{i++;if(i<=3){printf \" + %-30s%s\n\",f,\$1;rc=0}else if(i==4){printf \" + %-30s%s\n\",f,\"[...]\"}};END{exit rc}"
+ else
+ "${adb_zcatcmd}" "${file}" 2>/dev/null |
+ "${adb_awkcmd}" -v f="${file##*/}" "BEGIN{rc=1};/^($search|.*\\.${search})$/{i++;if(i<=3){printf \" + %-30s%s\n\",f,\$1;rc=0}else if(i==4){printf \" + %-30s%s\n\",f,\"[...]\"}};END{exit rc}"
+ fi
else
"${adb_awkcmd}" -v f="${file##*/}" "BEGIN{rc=1};/^($search|.*\\.${search})$/{i++;if(i<=3){printf \" + %-30s%s\n\",f,\$1;rc=0}else if(i==4){printf \" + %-30s%s\n\",f,\"[...]\"}};END{exit rc}" "${file}"
fi
(
f_list "${entry}" "${entry}"
) &
- hold="$((cnt % adb_cores))"
- [ "${hold}" = "0" ] && wait -n
+ [ "${cnt}" -gt "${adb_cores}" ] && wait -n
cnt="$((cnt + 1))"
done
(
f_list safesearch "${entry}"
) &
- hold="$((cnt % adb_cores))"
- [ "${hold}" = "0" ] && wait -n
+ [ "${cnt}" -gt "${adb_cores}" ] && wait -n
cnt="$((cnt + 1))"
done
fi
f_log "info" "download of '${src_name}' failed, url: ${src_url}, rule: ${src_rset:-"-"}, categories: ${src_cat:-"-"}, rc: ${src_rc}"
fi
if [ "${src_rc}" = "0" ] && [ -s "${src_tmpload}" ]; then
- "${adb_awkcmd}" "${src_rset}" "${src_tmpload}" | "${adb_sedcmd}" "s/\r//g" |
- "${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' |
- "${adb_sortcmd}" ${adb_srtopts} -u 2>/dev/null >"${src_tmpfile}"
- src_rc="${?}"
+ if [ "${adb_tld}" = "1" ]; then
+ "${adb_awkcmd}" "${src_rset}" "${src_tmpload}" | "${adb_sedcmd}" "s/\r//g" |
+ "${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' |
+ "${adb_sortcmd}" ${adb_srtopts} -u 2>/dev/null >"${src_tmpfile}"
+ src_rc="${?}"
+ else
+ "${adb_awkcmd}" "${src_rset}" "${src_tmpload}" | "${adb_sedcmd}" "s/\r//g" |
+ "${adb_sortcmd}" ${adb_srtopts} -u 2>/dev/null >"${src_tmpfile}"
+ src_rc="${?}"
+ fi
if [ "${src_rc}" = "0" ] && [ -s "${src_tmpfile}" ]; then
f_list download
[ "${adb_backup}" = "1" ] && f_list backup
fi
done
if [ "${src_rc}" = "0" ] && [ -s "${src_tmpload}" ]; then
- "${adb_awkcmd}" "${src_rset}" "${src_tmpload}" | "${adb_sedcmd}" "s/\r//g" |
- "${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' |
- "${adb_sortcmd}" ${adb_srtopts} -u >"${src_tmpfile}"
- src_rc="${?}"
+ if [ "${adb_tld}" = "1" ]; then
+ "${adb_awkcmd}" "${src_rset}" "${src_tmpload}" | "${adb_sedcmd}" "s/\r//g" |
+ "${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' |
+ "${adb_sortcmd}" ${adb_srtopts} -u >"${src_tmpfile}"
+ src_rc="${?}"
+ else
+ "${adb_awkcmd}" "${src_rset}" "${src_tmpload}" | "${adb_sedcmd}" "s/\r//g" |
+ "${adb_sortcmd}" ${adb_srtopts} -u >"${src_tmpfile}"
+ src_rc="${?}"
+ fi
if [ "${src_rc}" = "0" ] && [ -s "${src_tmpfile}" ]; then
f_list download
[ "${adb_backup}" = "1" ] && f_list backup
fi
) &
fi
- hold="$((cnt % adb_cores))"
- [ "${hold}" = "0" ] && wait -n
+ [ "${cnt}" -gt "${adb_cores}" ] && wait -n
cnt="$((cnt + 1))"
done
wait
# trace dns queries via tcpdump and prepare a report
#
f_report() {
- local report_raw report_txt content status total start end start_date start_time end_date end_time blocked percent top_list top array item index hold ports value key key_list cnt="0" resolve="-nn" action="${1}" top_count="${2:-"10"}" res_count="${3:-"50"}" search="${4:-"+"}"
+ local report_raw report_txt content status total start end start_date start_time end_date end_time blocked percent top_list top array item index ports value key key_list cnt="0" resolve="-nn" action="${1}" top_count="${2:-"10"}" res_count="${3:-"50"}" search="${4:-"+"}"
report_raw="${adb_reportdir}/adb_report.raw"
report_srt="${adb_reportdir}/adb_report.srt"
printf "%08d\t%s\t%s\t%s\t%-25s\t%s\n",$7,type,$1,substr($2,1,8),$4,domain}' >>"${report_raw}"
fi
) &
- hold="$((cnt % adb_cores))"
- [ "${hold}" = "0" ] && wait -n
+ [ "${cnt}" -gt "${adb_cores}" ] && wait -n
cnt="$((cnt + 1))"
done
wait
"focus": "compilation",
"descurl": "https://github.com/privacy-protection-tools/anti-AD/blob/master/README.md"
},
- "antipopads": {
- "url": "https://raw.githubusercontent.com/AdroitAdorKhan/antipopads-re/master/formats/domains.txt",
- "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
- "size": "L",
- "focus": "compilation",
- "descurl": "https://github.com/AdroitAdorKhan/antipopads-re"
- },
"anudeep": {
"url": "https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"focus": "tracking",
"descurl": "https://easylist.to"
},
+ "energized_blu": {
+ "url": "https://energized.pro/blu/domains.txt",
+ "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+ "size": "XL",
+ "focus": "compilation",
+ "descurl": "https://energized.pro"
+ },
+ "energized_spark": {
+ "url": "https://energized.pro/spark/domains.txt",
+ "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+ "size": "L",
+ "focus": "compilation",
+ "descurl": "https://energized.pro"
+ },
+ "energized_ultimate": {
+ "url": "https://energized.pro/ultimate/domains.txt",
+ "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+ "size": "XXL",
+ "focus": "compilation",
+ "descurl": "https://energized.pro"
+ },
"firetv_tracking": {
"url": "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/AmazonFireTV.txt",
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",