Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
css
fonts
img
js
server
.gitattributes
.gitignore
Readme.md
about.html
ajax.html
blacklist.html
manifest.json
options-old.html
options.html
popup.html
settings.html
signin.html
whitelist.html

Readme.md

Quick and Dirty chrome Extenstion and API for PiHole.

Code is messy and proof of concept. I'll update if there is interest.

  1. Put server/apiext.php on your pihole server. (Ie. /var/www/html/admin/)
  2. Edit apiext.php for your paths (if non-default) and change the apikey (default is 123456789)
  3. Edit /etc/sudoers (as root), Adding (3 lines) to the end. (assumes www-data is your webserver user):
User_Alias WWW_USER = www-data
Cmnd_Alias WWW_COMMANDS = /usr/local/bin/gravity.sh, /usr/local/bin/whitelist.sh, /usr/local/bin/blacklist.sh
WWW_USER ALL = (ALL) NOPASSWD: WWW_COMMANDS

This allows webserver user to execute the white/black/gravity scripts without being root. I couldn't think of an 'easier' way.

  1. Install chrome extension. (use developer mode for now...)
  2. Set chrome extension options - add url to apiext.php and your api key.

Now you can add/remove/edit your whitelist and blacklist.

You can’t perform that action at this time.