Skip to content
BeGoneAds is a script that puts some popular hosts file lists into the systems hosts file as a adblocker measure.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
begoneads Don't try to be fancier than we actually are (also fixes #9) Jun 22, 2019
.gitignore Make publishing to PyPI possible Jun 9, 2019
LICENSE.md Initial Feb 20, 2019
Makefile Fix some code style errors Jun 15, 2019
README.md Local sources Jun 9, 2019
setup.py Don't try to be fancier than we actually are (also fixes #9) Jun 22, 2019

README.md

BeGoneAds

GitHub code size in bytes GitHub issues GitHub pull requests GitHub made-with-python Awesome Badges

BeGoneAds is a script that puts some popular hosts file lists into the systems hosts file as a adblocker measure.

See it working on asciinema:

asciicast

Requirements

  • Python 3.6 or higher

Getting started

Clone this repository:

git clone https://github.com/anned20/begoneads.git

Install the program:

python setup.py install

You are now ready to use BeGoneAds:

begoneads

You should see something like:

Usage: begoneads [OPTIONS] COMMAND [ARGS]...

  Install or uninstall BeGoneAds, the host blocker for the system hosts
  file

Options:
  --help  Show this message and exit.

Commands:
  install    Install or update BeGoneAds
  uninstall  Uninstall BeGoneAds

Usage

To install the hosts to your system hosts file:

begoneads install

To install the hosts to your system hosts file with custom sources:

begoneads install --sources https://www.custom.sources/hosts,http://www.and-another.one/hosts

To install the hosts to your system hosts file with local sources:

begoneads install --local-sources path/to/hosts/file,other/path

The options sources and local-sources can be used together

To uninstall the hosts to your system hosts file:

begoneads uninstall

Sources of hosts data unified in this variant

Updated hosts files from the following locations are always unified and included:

Host file source Home page
Steven Black's ad-hoc list link
Malware Domain List link
add.Dead link
add.Spam link
Dan Pollock link
MVPS hosts file link
yoyo.org link
Mitchell Krog's - Badd Boyz Hosts link
CoinBlocker link
UncheckyAds link
add.2o7Net link
KADhosts link
AdAway link
add.Risk link

TODO for 1.0.0

  • Windows support
  • Custom selection of host files
  • Setuptools
  • Apply own hosts
  • Systemd integration
  • Package it for Debian, Arch, CentOS, Fedora, etc.

Testing

To run the tests you use pytest

Execute them with pytest in the project directory

Built with

  • requests - Getting the webpage
  • click - Parsing command line options
  • tqdm - Showing a fancy progress bar

License

This project is licensed under the MIT License - see the LICENSE.md file for details

You can’t perform that action at this time.