From 5771bf1d7a81a5458de2e06aa305fa00f8f105f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Sep 2023 10:04:37 +0000 Subject: [PATCH 1/6] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/codespell.yml | 2 +- .github/workflows/editorconfig-checker.yml | 2 +- .github/workflows/shellcheck.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index be1403a..5ef0a22 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Spell-Checking uses: codespell-project/actions-codespell@master diff --git a/.github/workflows/editorconfig-checker.yml b/.github/workflows/editorconfig-checker.yml index b7ac129..40f82aa 100644 --- a/.github/workflows/editorconfig-checker.yml +++ b/.github/workflows/editorconfig-checker.yml @@ -19,6 +19,6 @@ jobs: name: editorconfig-checker runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: editorconfig-checker/action-editorconfig-checker@main - run: editorconfig-checker diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 4245481..25da7ac 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -23,7 +23,7 @@ jobs: steps: # Required to access files of this repository - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Download Shellcheck and add it to the workflow path - name: Download Shellcheck From d45408a0953b007b25fd43c1e805e4aa1589e458 Mon Sep 17 00:00:00 2001 From: Thomas Merz Date: Fri, 17 Nov 2023 17:33:30 +0100 Subject: [PATCH 2/6] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20=20fix=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pihole_adlist_tool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pihole_adlist_tool b/pihole_adlist_tool index 6b0a38d..b9370cb 100755 --- a/pihole_adlist_tool +++ b/pihole_adlist_tool @@ -661,7 +661,7 @@ echo " [i] You have ${bold}$NUM_ADLISTS adlists${normal} configured ($NUM_ADLI echo " [i] Your gravity.db contains ${bold}$NUM_GRAVITY_UNIQUE_DOMAINS unique domains${normal}" echo " [i] Since $DATE_FIRST_ANALYZED ${bold}$NUM_DOMAINS_BLOCKED different domains${normal} from your adlists have been blocked ${bold}$HITS_TOTAL times${normal} in total" echo " (blocked directly by gravity or during deep CNAME inspection)" -echo " [i] Using you current adlist configuration ${bold}$NUM_DOMAINS_BLOCKED_CURRENT domains${normal} would have been blocked ${bold}$HITS_TOTAL_CURRENT times${normal}" +echo " [i] Using your current adlist configuration ${bold}$NUM_DOMAINS_BLOCKED_CURRENT domains${normal} would have been blocked ${bold}$HITS_TOTAL_CURRENT times${normal}" echo echo From 4515d2b254828259487222a309357286399b287e Mon Sep 17 00:00:00 2001 From: holly79 <44322460+holly79@users.noreply.github.com> Date: Thu, 1 Feb 2024 23:12:26 +0100 Subject: [PATCH 3/6] fix #65 --- pihole_adlist_tool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pihole_adlist_tool b/pihole_adlist_tool index 6b0a38d..0e3c318 100755 --- a/pihole_adlist_tool +++ b/pihole_adlist_tool @@ -807,7 +807,7 @@ if [ "$FURTHER_ACTION" -eq 2 ]; then then sudo bash -c "PIHOLE_DOCKER=0; $SUDO_SQLITE; sqlite $GRAVITY 'UPDATE adlist SET enabled=1 where id=$adlist_id;'" else - sqlite $GRAVITY "UPDATE adlist SET enabled=1 where id=$adlist_id;'" + sqlite $GRAVITY "UPDATE adlist SET enabled=1 where id=$adlist_id;" fi done From 6e0b3df3f0419ce9671958c82c7a986b30b8395b Mon Sep 17 00:00:00 2001 From: yubiuser Date: Fri, 9 Feb 2024 20:52:59 +0100 Subject: [PATCH 4/6] Create LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4337671 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 yubiuser(Christian König) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From b4819b7b44be70310a386b702c693b3e5f94cebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Fri, 9 Feb 2024 21:16:05 +0100 Subject: [PATCH 5/6] Add Maintenance mode notice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index f8ca8a2..cf3e6d6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ +## Maintenance mode + +This repo is in maintenance mode: It's unlikely that I will add new features myself but are willing to accept external pull requests. There are several reasons for this decisions: + +- When I released the first version 4 years ago, Pi-hole' blocking capabilities were more limited than today. It was way more simple to deduct from the `gravity` database which queries would have been blocked than it is today. Pi-hole's regex filtering could only be taken into account by parsing the output of the `pihole-FTL` regex engine - which is already kind of a hack. Adding all the code to apply the ABP-style filtering to the queries is out-of-scope (maybe even impossible in a shell script). So the gap between the filtering by Pi-hole and what's reported by the tool gets wider. +- The tool is quite slow and I'm not sure if this could be improved within the limits of a shell script. +- There is a lack of motivation and time to address the above issues. + +I'll added a MIT licence so anyone who would like to continue to improve or use the tool should be able to do so. +If I would start fresh, I'll probably would use another language (maybe C, maybe GO) which would allow to implement/reuse `FTL`'s regex engine allowing to parse the regex domains and the ABP-style entries. + + + # Pihole Adlist Tool This script tries to provide you with a bunch of information that enables you to decide which adlists you need based on your browsing behavior. It does that by matching your browsing history (FTL's querylog) with your current adlist configuration (gravity database) generating a list of domains that you have visited in the past and which would have been blocked if your current adlist configuration would have been in place back then. From 034590609a65530e4baaadb094222d3c76ec3b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Fri, 9 Feb 2024 21:18:36 +0100 Subject: [PATCH 6/6] Bump version to 2.6.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- pihole_adlist_tool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pihole_adlist_tool b/pihole_adlist_tool index f82d71c..4859c21 100755 --- a/pihole_adlist_tool +++ b/pihole_adlist_tool @@ -1,6 +1,6 @@ #!/bin/bash -PIHOLE_ADLIST_TOOL_VERSION="2.6.3" +PIHOLE_ADLIST_TOOL_VERSION="2.6.5" # define path to pihole's databases and temporary database TEMP_DB="/tmp/temp.db"