How can I determine which adblock lists block a given url?

Title say it all. Ideally I would like a field into which I could enter a url and get back the set of blocking lists.

I think kresd already gets data where this isn’t represented, so it’s probably best to ask @dibdot.

Adblock prepares a single merged, sorted & optimized blocklist for the dns backends, without any sourcelist information.

To get this kind of information, enable the adblock backup function. These backups are compressed & still separated per source. To search these backups, use this script snippet:

#!/bin/sh

# search.sh <DOMAIN>

input="${1}"
search="${input//./\.}"

for file in ./*.gz
do
        zcat "${file}" | awk -v f="${file}" "/${search}+$/{printf \"%-30s%s\n\",f,\$1}"
done

Save the script as “search.sh” in your adblock backup folder and make it executable. The script requires only a domain as input parameter (e.g. heise.de). Example output as follows:

root@blackhole:/mnt/data/adblock# ./search.sh heise.de
./adb_list.shalla.gz          advert.heise.de
./adb_list.shalla.gz          oas.heise.de
./adb_list.shalla.gz          oas.wwwheise.de
./adb_list.shalla.gz          prophet.heise.de
./adb_list.ut_capitole.gz     advert.heise.de
./adb_list.whocares.gz        oas.heise.de

Hope this helps!

1 Like

Yes that helps a lot. Thank you very much.