PiHole Regex Filter

Origin

So, I was looking through all the records and noticed that sometimes the record wanted to purge a specific website with multiple endings and thought that the regex would help. Like maybe there is a pattern that we aren't noticing that could be better at blocking X threshold, so it is worth it.

Overview

The program would take in a mass amount of blacklist entries found on the internet and find a simple overview regex to match them. Then it would take all the regex created and try to make a more refined one for the specific set of them with a threshold being my case 100 entries. This would help with the number of entries in the table and maybe catch things that are not added yet but should be.

Failure

I thought it through and though this is a good idea, in the long run it wouldn't be worth it. The reason why is because when we are checking the address, a binary search is ran through the database of websites, if it is not found it goes through regex. The problem then is it has to go through all the regex so in speed comparison, it would be faster to type out all of the extensions then it would be to use a regex, but for learning purpose you could use the records captured to learn more if that is possible, but that is not my main interest.

Last updated