Automatic Filter Generation

General TSS software questions and comments.

Moderators: Tyler, Scott, General Moderator

Post Reply
Posts: 6
Joined: Thu Jul 09, 2015 7:03 am

Automatic Filter Generation

Post by AlanM »

Since it can at times be challenging to add filters that are precise, I've written a vbs script to help automate the process. I've attached a .zip file containing the script, sample input/output files, and some documentation. Use at your own enjoyment/risk.

The reason for the challenge is that a generic filter entry like this...

...will [probably incorrectly] match things like:

Tightening up the filter to prevent such incorrect matches requires some effort and complicates maintenance and readability of the URL.txt file.

This script takes a fairly simple-looking filter input (in a file called PreURL.txt) and creates an output file (PostURL.txt) with the expanded filters that can be used directly by PWB. For instance:

Suppose you want to allow PWB to accept URLs from any page in the domain ''
In PreURL.txt, this entry will appear thusly:


After PreFilter.vbs runs, this one line will turn into the following in PostURL.txt:


If you find problems or have feature requests, I can supply very limited support on this thread.
PreFilter.vbs and documentation
(5.04 KiB) Downloaded 1119 times

Post Reply