Files
web/list/add.php
T
Mcat12 4dff31a6de Added advanced whitelist/blacklist site
- Accessed under the "Whitelist" tab
- Added "Add: " in front of the text box for the simple whitelist
- Added "ad.example.com" as a placeholder in the text box

Currently www-data needs root access to gravity.sh (for adding to the blacklist). If we get a blacklist.sh, we may be able to get rid of the need for root.
2016-01-10 16:31:41 -05:00

10 lines
284 B
PHP

<?php
if(!isset($_GET['domain'], $_GET['list']))
return;
if($_GET['list'] == "white")
exec("/usr/local/bin/whitelist.sh ${_GET['domain']}");
else {
exec("echo '${_GET['domain']}' | sudo tee -a /etc/pihole/blacklist.txt");
exec("/usr/local/bin/gravity.sh");
}