View Single Post
Old 07-06-2023, 07:50 AM   #89
trcm
Connoisseur
trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!
 
Posts: 96
Karma: 100000
Join Date: Dec 2018
Location: London
Device: Kobo Libra H2O
Can't remember exactly, but this is what I used in past to generate the list of things to block on the Kindle itself.

Code:
# Block unwanted domains with the /etc/hosts file
echo ".d" | sqlite3 /opt/var/local/reg/ServerConfig.db \
    | awk -F, '/VALUES/ {gsub(/\047/,""); gsub(/\;\)/,""); print $3}' \
    | grep -o '.*\..*\..*' \
    | grep -Ev 'com.lab126|DOMAIN|WEBSITE|THUMB|openid.assoc_handle' \
    | sed 's/);//;
            s/^http:\/\///;
            s/^https:\/\///;
            s/\/.*//;s/:.*//;
            s/|/\n/g;
            /^\./d;
            /^\[/d;
            /^$/d' \
    | sort -u \
    | while read -r; do
         echo "Blocking host : $REPLY"
         grep -q "$REPLY" /etc/hosts || echo "127.0.0.1 $REPLY" >> /etc/hosts
     done
From an old backup, I think it's this one in particular to block updates, but it was a long time ago....
Code:
127.0.0.1 firs-ta-g7g.amazon.com

Last edited by trcm; 07-06-2023 at 07:58 AM. Reason: add
trcm is offline   Reply With Quote