Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print more details in CLI regex-test #1287

Merged
merged 2 commits into from Jan 23, 2022
Merged

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Jan 22, 2022

By submitting this pull request, I confirm the following:

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


Prints details about parsed Pi-hole regex extensions changing the effect of regular expressions.

Examples:

./pihole-FTL regex-test "f" 'f;querytype=AAAA'

[i] Compiling regex filter...
    Compiled regex filter in 0.646 msec

Checking domain...
    f;querytype=AAAA matches
    Hint: This regex matches only type AAAA queries   <-----------
   Time: 0.449 msec
./pihole-FTL regex-test "f" 'f;querytype=!TXT'

[i] Compiling regex filter...
    Compiled regex filter in 0.646 msec

Checking domain...
    f;querytype=!TXT matches
    Hint: This regex never matches type TXT queries   <-----------
   Time: 0.449 msec
./pihole-FTL regex-test "f" 'g;invert'

[i] Compiling regex filter...
    Compiled regex filter in 0.050 msec

Checking domain...
    g;invert matches
    Hint: This regex matches inverted   <-----------
   Time: 0.046 msec
./pihole-FTL regex-test "f" 'f;reply=NXDOMAIN'

[i] Compiling regex filter...
    Compiled regex filter in 0.030 msec

Checking domain...
    f;reply=NXDOMAIN matches
    Hint: This regex forces reply type NXDOMAIN   <-----------
   Time: 0.019 msec

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER merged commit bd5aab9 into development Jan 23, 2022
@DL6ER DL6ER deleted the new/regex_test_extension branch January 23, 2022 08:17
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-ftl-v5-14-web-v5-11-and-core-v5-9-released/53529/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants