Updated adding/subtracting to/from lists

This commit is contained in:
Mcat12
2016-01-17 16:34:43 -05:00
parent e61a28642a
commit 581494d4c5
2 changed files with 18 additions and 10 deletions
+9 -7
View File
@@ -1,10 +1,12 @@
<?php
if(!isset($_GET['domain'], $_GET['list']))
die();
return;
if($_GET['list'] == "white")
exec("/usr/local/bin/whitelist.sh ${_GET['domain']}");
else {
exec("echo '${_GET['domain']}' >> /etc/pihole/blacklist.txt");
exec("sudo /usr/local/bin/gravity.sh");
}
switch($_GET['list']) {
case "white":
exec("/usr/local/bin/whitelist.sh -q ${_GET['domain']}");
break;
case "black":
exec("/usr/local/bin/blacklist.sh -q ${_GET['domain']}");
break;
}