adblock: limit domain name length
authorDirk Brenken <dev@brenken.org>
Sun, 24 May 2020 19:40:58 +0000 (21:40 +0200)
committerDirk Brenken <dev@brenken.org>
Sun, 24 May 2020 19:40:58 +0000 (21:40 +0200)
* limit domain name length to max. 63 chars
  to fix issues with energized sources

Signed-off-by: Dirk Brenken <dev@brenken.org>
net/adblock/Makefile
net/adblock/files/adblock.sh
net/adblock/files/adblock.sources

index 0ce108baa746fa5f64b4d23f2c544a32cfe46093..5e32dc83eb02edf0199ee0b0f756c49521fb0258 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
 PKG_VERSION:=4.0.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index 8098f2db6103f36a3586df20eb927b7204689d72..ae208a00071626b42b5a8de8eea040e7b1a2e802 100755 (executable)
@@ -677,7 +677,7 @@ f_list()
                        src_name="${mode}"
                        if [ "${src_name}" = "blacklist" ] && [ -s "${adb_blacklist}" ]
                        then
-                               rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
+                               rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
                                "${adb_awk}" "${rset}" "${adb_blacklist}" | \
                                "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${adb_tmpdir}/tmp.raw.${src_name}"
                                sort ${adb_srtopts} -u "${adb_tmpdir}/tmp.raw.${src_name}" 2>/dev/null > "${adb_tmpfile}.${src_name}"
@@ -685,12 +685,12 @@ f_list()
                                rm -f "${adb_tmpdir}/tmp.raw.${src_name}"
                        elif [ "${src_name}" = "whitelist" ] && [ -s "${adb_whitelist}" ]
                        then
-                               rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
+                               rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
                                "${adb_awk}" "${rset}" "${adb_whitelist}" > "${adb_tmpdir}/tmp.raw.${src_name}"
                                out_rc="${?}"
                                if [ "${out_rc}" -eq 0 ]
                                then
-                                       rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\\.\",\"\\\\.\",\$1);print tolower(\"^(|.*\\\\.)\"\$1\"$\")}"
+                                       rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\\.\",\"\\\\.\",\$1);print tolower(\"^(|.*\\\\.)\"\$1\"$\")}"
                                        "${adb_awk}" "${rset}" "${adb_tmpdir}/tmp.raw.${src_name}" > "${adb_tmpdir}/tmp.rem.${src_name}"
                                        out_rc="${?}"
                                        if [ "${out_rc}" -eq 0 ] && [ "${adb_dnsallow}" != "1" ]
@@ -714,7 +714,7 @@ f_list()
                "safesearch")
                        case "${src_name}" in
                                "google")
-                                       rset="/^(\\.[[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{printf \"%s\n%s\n\",tolower(\"www\"\$1),tolower(substr(\$1,2,length(\$1)))}"
+                                       rset="/^(\\.[[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{printf \"%s\n%s\n\",tolower(\"www\"\$1),tolower(substr(\$1,2,length(\$1)))}"
                                        safe_url="https://www.google.com/supported_domains"
                                        safe_ips="216.239.38.120 2001:4860:4802:32::78"
                                        safe_cname="forcesafesearch.google.com"
index 129835388ebd3f9c072f80846b10b5f989f47103..5d9570d28686c5e9cbfb1993507660041829290d 100644 (file)
 {
        "adaway": {
                "url": "https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt",
-               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "S",
                "focus": "mobile",
                "descurl": "https://github.com/AdAway/adaway.github.io"
        },
        "adguard": {
                "url": "https://filters.adtidy.org/windows/filters/15.txt",
-               "rule": "BEGIN{FS=\"[\/|^|\\r]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+[\\/\\^\\r]+$/{print tolower($3)}",
+               "rule": "BEGIN{FS=\"[\/|^|\\r]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+[\\/\\^\\r]+$/{print tolower($3)}",
                "size": "L",
                "focus": "general",
                "descurl": "https://adguard.com"
        },
        "andryou": {
                "url": "https://gitlab.com/andryou/block/raw/master/kouhai-compressed-domains",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "L",
                "focus": "compilation",
                "descurl": "https://gitlab.com/andryou/block/-/blob/master/readme.md"
        },
        "anudeep": {
                "url": "https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt",
-               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "M",
                "focus": "compilation",
                "descurl": "https://github.com/anudeepND/blacklist"
        },
        "bitcoin": {
                "url": "https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt",
-               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "S",
                "focus": "mining",
                "descurl": "https://github.com/hoshsadiq/adblock-nocoin-list"
        },
        "disconnect": {
                "url": "https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "S",
                "focus": "general",
                "descurl": "https://disconnect.me"
        },
        "dshield": {
                "url": "https://www.dshield.org/feeds/suspiciousdomains_Low.txt",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "XL",
                "focus": "general",
                "descurl": "https://www.dshield.org"
        },
        "energized_blugo": {
                "url": "https://block.energized.pro/bluGo/formats/domains.txt",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "XL",
                "focus": "compilation",
                "descurl": "https://energized.pro"
        },
        "energized_blu": {
                "url": "https://block.energized.pro/blu/formats/domains.txt",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "XL",
                "focus": "compilation",
                "descurl": "https://energized.pro"
        },
        "energized_porn": {
                "url": "https://block.energized.pro/porn/formats/domains.txt",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "XXL",
                "focus": "compilation+porn",
                "descurl": "https://energized.pro"
        },
        "energized_ultimate": {
                "url": "https://block.energized.pro/ultimate/formats/domains.txt",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "XXL",
                "focus": "compilation",
                "descurl": "https://energized.pro"
        },
        "energized_unified": {
                "url": "https://block.energized.pro/unified/formats/domains.txt",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "XXL",
                "focus": "compilation",
                "descurl": "https://energized.pro"
        },
        "malwaredomains": {
                "url": "http://mirror.espoch.edu.ec/malwaredomains/justdomains",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "M",
                "focus": "malware",
                "descurl": "https://www.malwaredomains.com"
        },
        "malwarelist": {
                "url": "https://www.malwaredomainlist.com/hostslist/hosts.txt",
-               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "S",
                "focus": "malware",
                "descurl": "https://www.malwaredomainlist.com"
        },
        "notracking": {
                "url": "https://raw.githubusercontent.com/notracking/hosts-blocklists/master/dnscrypt-proxy/dnscrypt-proxy.blacklist.txt",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "XL",
                "focus": "tracking",
                "descurl": "https://github.com/notracking/hosts-blocklists"
        },
        "oisd_nl": {
                "url": "https://dbl.oisd.nl",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "XXL",
                "focus": "general",
                "descurl": "https://oisd.nl"
        },
        "openphish": {
                "url": "https://openphish.com/feed.txt",
-               "rule": "BEGIN{FS=\"\/\"}/^http[s]?:\\/\\/([[:alnum:]_-]+\\.)+[[:alpha:]]+(\\/|$)/{print tolower($3)}",
+               "rule": "BEGIN{FS=\"\/\"}/^http[s]?:\\/\\/([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+(\\/|$)/{print tolower($3)}",
                "size": "S",
                "focus": "phishing",
                "descurl": "https://openphish.com"
        },
        "phishing_army": {
                "url": "https://phishing.army/download/phishing_army_blocklist_extended.txt",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "S",
                "focus": "phishing",
                "descurl": "https://phishing.army"
        },
        "reg_cn": {
                "url": "https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt",
-               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
                "size": "M",
                "focus": "reg_china",
                "descurl": "https://easylist.to"
        },
        "reg_de": {
                "url": "https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt",
-               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
                "size": "M",
                "focus": "reg_germany",
                "descurl": "https://easylist.to"
        },
        "reg_es": {
                "url": "https://easylist-downloads.adblockplus.org/easylistspanish+easylist.txt",
-               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
                "size": "M",
                "focus": "reg_spain",
                "descurl": "https://easylist.to"
        },
        "reg_fi": {
                "url": "https://raw.githubusercontent.com/finnish-easylist-addition/finnish-easylist-addition/master/Finland_adb.txt",
-               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
                "size": "S",
                "focus": "reg_finland",
                "descurl": "https://github.com/finnish-easylist-addition"
        },
        "reg_id": {
                "url": "https://easylist-downloads.adblockplus.org/abpindo+easylist.txt",
-               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
                "size": "M",
                "focus": "reg_indonesia",
                "descurl": "https://easylist.to"
        },
        "reg_nl": {
                "url": "https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt",
-               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
                "size": "M",
                "focus": "reg_netherlands",
                "descurl": "https://easylist.to"
        },
        "reg_pl": {
                "url": "https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt",
-               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "S",
                "focus": "reg_poland",
                "descurl": "https://kadantiscam.netlify.com"
        },
        "reg_ro": {
                "url": "https://easylist-downloads.adblockplus.org/rolist+easylist.txt",
-               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
                "size": "M",
                "focus": "reg_romania",
                "descurl": "https://easylist.to"
        },
        "reg_ru": {
                "url": "https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt",
-               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
+               "rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
                "size": "M",
                "focus": "reg_russia",
                "descurl": "https://easylist.to"
        },
        "reg_vn": {
                "url": "https://raw.githubusercontent.com/bigdargon/hostsVN/master/hosts",
-               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "S",
                "focus": "reg_vietnam",
                "descurl": "https://bigdargon.github.io/hostsVN"
        },
        "shallalist": {
                "url": "http://www.shallalist.de/Downloads/shallalist.tar.gz",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "categories": [
                                "adv", "costtraps", "spyware", "tracker", "warez"
                ],
        },
        "shallalist_porn": {
                "url": "http://www.shallalist.de/Downloads/shallalist.tar.gz",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "categories": [
                                "adv", "costtraps", "porn", "spyware", "tracker", "warez"
                ],
        },
        "smarttv": {
                "url": "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "S",
                "focus": "smarttv",
                "descurl": "https://github.com/Perflyst/PiHoleBlocklist"
        },
        "spam404": {
                "url": "https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "S",
                "focus": "general",
                "descurl": "https://github.com/Dawsey21"
        },
        "stevenblack": {
                "url": "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts",
-               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "L",
                "focus": "compilation",
                "descurl": "https://github.com/StevenBlack/hosts"
        },
        "stevenblack_porn": {
                "url": "https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts",
-               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "L",
                "focus": "compilation",
                "descurl": "https://github.com/StevenBlack/hosts"
        },
        "stopforumspam": {
                "url": "https://www.stopforumspam.com/downloads/toxic_domains_whole.txt",
-               "rule": "/^[[:space:]]*([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^[[:space:]]*([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "S",
                "focus": "spam",
                "descurl": "https://www.stopforumspam.com"
        },
        "sysctl": {
                "url": "http://sysctl.org/cameleon/hosts",
-               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "M",
                "focus": "general",
                "descurl": "http://sysctl.org/cameleon"
        },
        "utcapitole": {
                "url": "https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "categories": [
                                "publicite", "bitcoin", "cryptojacking", "ddos", "malware", "phishing", "warez"
                ],
        },
        "utcapitole_porn": {
                "url": "https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "categories": [
                                "adult", "publicite", "bitcoin", "cryptojacking", "ddos", "malware", "phishing", "warez"
                ],
        },
        "wally3k": {
                "url": "https://v.firebog.net/hosts/static/w3kbl.txt",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "S",
                "focus": "compilation",
                "descurl": "https://firebog.net/about"
        },
        "whocares": {
                "url": "https://someonewhocares.org/hosts/hosts",
-               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "M",
                "focus": "general",
                "descurl": "https://someonewhocares.org"
        },
        "winhelp": {
                "url": "http://winhelp2002.mvps.org/hosts.txt",
-               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "S",
                "focus": "general",
                "descurl": "http://winhelp2002.mvps.org"
        },
        "winspy": {
                "url": "https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt",
-               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "S",
                "focus": "win_telemetry",
                "descurl": "https://github.com/crazy-max/WindowsSpyBlocker"
        },
        "youtube": {
                "url": "https://raw.githubusercontent.com/kboghdady/youTube_ads_4_pi-hole/master/black.list",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "M",
                "focus": "youtube",
                "descurl": "https://github.com/kboghdady/youTube_ads_4_pi-hole"
        },
        "yoyo": {
                "url": "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext",
-               "rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "S",
                "focus": "general",
                "descurl": "https://pgl.yoyo.org"