Skip to content

Commit

Permalink
Added advanced whitelist/blacklist site
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
AzureMarker committed Jan 10, 2016
1 parent 48952c5 commit 4dff31a
Show file tree
Hide file tree
Showing 251 changed files with 42,043 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@
TODO
*.zip
test.html
*.log
*.log

# Intellij IDEA Project Files
*.iml
*.ipr
*.iws
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ function runSearchShellScript(charCodeEntered) {
</a>
<ul class="treeview-menu">
<!-- Press Enter to run the script and then show no more than 10 lines of output -->
<a href="#" disabled><li id="li00"></li><input type="text" id='get_whitelist' onkeypress="runSearchShellScript(event)"></a>
<ul class="sidebar-menu"><li><a href="list/index.php"><i class="fa fa-cogs"></i> Advanced</a></li></ul>
<a href="#" disabled><li id="li00"></li>Add: <input type="text" id='get_whitelist' onkeypress="runSearchShellScript(event)" placeholder="ad.example.com"></a>
<a href="#" disabled><li id="li01"></li></a>
<a href="#" disabled><li id="li02"></li></a>
<a href="#" disabled><li id="li03"></li></a>
Expand Down
10 changes: 10 additions & 0 deletions list/add.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?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");
}
25 changes: 25 additions & 0 deletions list/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Pi-Hole List",
"description": "Manage the Pi-Hole's Whitelist and Blacklist",
"main": "",
"moduleType": [],
"authors": [
"Mcat12 <[email protected]>"
],
"license": "MIT",
"homepage": "",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests",
"*.iml",
"*.ipr",
"*.iws"
],
"dependencies": {
"bootstrap": "~3.3.6"
}
}
45 changes: 45 additions & 0 deletions list/bower_components/bootstrap/.bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "bootstrap",
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"keywords": [
"css",
"js",
"less",
"mobile-first",
"responsive",
"front-end",
"framework",
"web"
],
"homepage": "http://getbootstrap.com",
"license": "MIT",
"moduleType": "globals",
"main": [
"less/bootstrap.less",
"dist/js/bootstrap.js"
],
"ignore": [
"/.*",
"_config.yml",
"CNAME",
"composer.json",
"CONTRIBUTING.md",
"docs",
"js/tests",
"test-infra"
],
"dependencies": {
"jquery": "1.9.1 - 2"
},
"version": "3.3.6",
"_release": "3.3.6",
"_resolution": {
"type": "version",
"tag": "v3.3.6",
"commit": "81df608a40bf0629a1dc08e584849bb1e43e0b7a"
},
"_source": "git://github.com/twbs/bootstrap.git",
"_target": "~3.3.6",
"_originalSource": "bootstrap",
"_direct": true
}
5 changes: 5 additions & 0 deletions list/bower_components/bootstrap/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bootstrap uses [GitHub's Releases feature](https://github.com/blog/1547-release-your-software) for its changelogs.

See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap.

Release announcement posts on [the official Bootstrap blog](http://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release.
Loading

0 comments on commit 4dff31a

Please sign in to comment.