A tool for putting hosts into a blackhole
Project description
Webnull
======
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 example.com`
Above, example.com will be added to your hosts file and routed to localhost. The next time you try to visit example.com 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.
Installation
--------------
`pip install webnull`
Usage
---------
```
$ sudo webnull deny example.com
$ sudo webnull deny https://example.com/foo/bar
$ sudo webnull allow example.com
$ sudo webnull allow -t 30 example.com
$ sudo webnull allow -a
$ sudo webnull allow -am
```
Development
=========
Dev Mode
--------------
Dev Mode protects your live hostfile during development
```
$ cp /etc/hosts dummyhosts
$ export DEV_MODE=1
$ ./webnull.py allow ...
```
Testing
----------
```
$ brew install python
$ easy_install pip
$ pip install virtualenv
$ virtualenv venv
$ source venv/bin/activate
$ pip install watchdog
$ python setup.py test
```
Releasing
-------------
```
$ python setup.py 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.
======
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 example.com`
Above, example.com will be added to your hosts file and routed to localhost. The next time you try to visit example.com 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.
Installation
--------------
`pip install webnull`
Usage
---------
```
$ sudo webnull deny example.com
$ sudo webnull deny https://example.com/foo/bar
$ sudo webnull allow example.com
$ sudo webnull allow -t 30 example.com
$ sudo webnull allow -a
$ sudo webnull allow -am
```
Development
=========
Dev Mode
--------------
Dev Mode protects your live hostfile during development
```
$ cp /etc/hosts dummyhosts
$ export DEV_MODE=1
$ ./webnull.py allow ...
```
Testing
----------
```
$ brew install python
$ easy_install pip
$ pip install virtualenv
$ virtualenv venv
$ source venv/bin/activate
$ pip install watchdog
$ python setup.py test
```
Releasing
-------------
```
$ python setup.py 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
webnull-1.0.1.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file webnull-1.0.1.tar.gz
.
File metadata
- Download URL: webnull-1.0.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 385ccaacf2061fddb8ac954986fec05c59e32d2ffa8c1829f6f5f431b3a101fd |
|
MD5 | 1a5a12eeb7572767540985bf7ba43877 |
|
BLAKE2b-256 | 4a04871a2f7692700d8f0bd0add610d9e4badfb802f39f9e51fd0224d547fb1f |
File details
Details for the file webnull-1.0.1-py2-none-any.whl
.
File metadata
- Download URL: webnull-1.0.1-py2-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36fb867fc8eb849761cf94fb95464008956313ba7bf2cc0d823a172cbabac6de |
|
MD5 | 2dad7414ea6eb526426c1b57273c9c11 |
|
BLAKE2b-256 | 3043c40a4020bd4682bded69cb75837605e0df8d33ff78b34e990b9503e4495c |