skip to navigation
skip to content

webnull 1.0.1

A tool for putting hosts into a blackhole

A tool for putting hosts into a blackhole.

Webnull is a command line program that lets you stop your computer from being able to reach certain websites.

Usage: `sudo webnull deny`

Above, will be added to your hosts file and routed to localhost. The next time you try to visit your browser won't be able to find it.

Later, `sudo webnull allow example` will re-allow access to the site for five minutes.

`sudo webnull allow -am` will allow access to all blocked sites until tomorrow morning.

See `webnull -h` for full usage.

`pip install webnull`

$ sudo webnull deny
$ sudo webnull deny
$ sudo webnull allow
$ sudo webnull allow -t 30
$ sudo webnull allow -a
$ sudo webnull allow -am


Dev Mode
Dev Mode protects your live hostfile during development
$ cp /etc/hosts dummyhosts
$ export DEV_MODE=1
$ ./ allow ...

$ brew install python
$ easy_install pip
$ pip install virtualenv
$ virtualenv venv
$ source venv/bin/activate
$ pip install watchdog
$ python test

$ python sdist bdist_wheel
$ twine upload dist/* [-r testpypi]
$ rm -rf dist/*
* tag the release
* bump the version number

This code has only been tested on macOS with python 2.7

It will only work on systems that use an /etc/hosts file.

File Type Py Version Uploaded on Size
webnull-1.0.1-py2-none-any.whl (md5) Python Wheel py2 2017-06-19 6KB
webnull-1.0.1.tar.gz (md5) Source 2017-06-19 4KB