Give Mee No Ads!

Rating: 
0
No votes yet

CLI scripts for Give Mee No Ads!

Scripts to ease up /etc/hosts adblocking

Keywords:

Application versions: 
AttachmentSizeDate
File give-mee-no-ads-cli_1.0-2_all.deb2.4 KB05/02/2014 - 23:58
File give-mee-no-ads-cli_1.0-3_all.deb2.5 KB22/07/2014 - 15:44
Changelog: 

give-mee-no-ads (1.0-3) unstable; urgency=low

* Added wget to depends

Comments

chrm's picture

Thats the content of the update-hosts-adblocking script:

----

#!/bin/sh
wget -O /tmp/hosts http://winhelp2002.mvps.org/hosts.txt && echo "127.0.0.1" $(uname -n) "localhost" > /etc/hosts && tr -d '\015' < /tmp/hosts >> /etc/hosts

if [ $? -ne 0 ]
then
    echo "ERROR! Updating the host failed"
    exit 1
else
    echo "Updated /etc/hosts"
    exit 0
fi

----

No backup file creation there. Be careful, no idea who controls the hosts.txt file.

marmistrz's picture

The backup is created in postinst.

Alexxxlrus's picture

Разаобрался как оно работает ...

Скачивает актуальный хост файл из http://winhelp2002.mvps.org/hosts.txt

и подкладывает в систему.. в результате чего, надо понимать, нельзя получить контент с адресов указанных в хост файле ... как то так... 

marmistrz's picture

Это так же работает.

temev's picture

A bit of user guide would be nice. Can't see how this works.

Alexxxlrus's picture

+1!

 

How to use it ????

marmistrz's picture

Use the script `update-hosts-adblocking`. No options there. Just run as root with internet connection on. It backs up your original hosts to /etc/hosts.bak IIRC.

Alexxxlrus's picture

hi!

A more detailed description can be?

marmistrz's picture

Sure, thought it'd be imported from control :)