Skip to content

Commit

Permalink
1.1.1, fix no subs search
Browse files Browse the repository at this point in the history
  • Loading branch information
securechicken committed Jun 7, 2023
1 parent d99a6de commit 407b659
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [1.1.1] - 2023-06-07
- Fixed: subdomains were not searched anymore for searches with less than 1000 domains, since 1.1.0.

## [1.1.0] - 2021-07-25
- Fixed: FQDNs/domains from input file can now be internationalized names (punnycode: xn--...);
- Changed: the script can now check more than 1000 domains at once (it will take a huge time though) - it only could search for 999 FQDNs/domains at once before (SQLite3 maximum tree depth limitation);
- Changed: FQDNs/domains from input are now searched as exact names or subdomains of these exact names only by default. Any DNS query for a hostname ending with the input name matched before, leading in some irrelevant matches, i.e. "anytoto.com" and "any.toto.com" matched for "toto.com", while now "toto.com" and "any.toto.com" still match for "toto.com", but not "anytoto.com".

## [1.0.0] - 2021-03-07
- No changes since 1.0.0-beta.1. Versioned as 1.0.0 after more than 15 days without any reported issue.
- Fixed: removed useless code from initial Pi-hole CLI PR.
Expand Down
2 changes: 2 additions & 0 deletions pihole-checklogs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

# pihole-cheklogs.sh
# VERSION: 1.1.1
# Requires a full working Pi-hole environment, Bash 4+, GNU grep and zcat.
#
# Check Pi-hole FTL-DB and DNS logs for a list of given domains/IPs, in order to
Expand Down Expand Up @@ -353,6 +354,7 @@ function check_domains() {
index=0
fi
done
like_values="${like_values}${like_buffer}"
in_list="${in_list//\'\'/\', \'}"
if [[ "${FQDN_MATCH_SUBDOMAINS}" == true ]]; then
ftl_query="SELECT DISTINCT timestamp,domain,client FROM queries WHERE domain IN (${in_list})${like_values}"
Expand Down

0 comments on commit 407b659

Please sign in to comment.