Use dictionary word anywhere in the mask
#5
Thanks undeath. Sorry about that mistake.

So just in case this can help someone else save a bit of time, here is how I generated my rules file with Python:

Code:
import subprocess

prepend = "^?a"
append = "$?a"

masks = []
for begin_count in range(3):
    for end_count in range(begin_count+1):
        mask1 = begin_count * prepend + end_count * append
        mask2 = end_count * prepend + begin_count * append
        if mask1 != '': masks.append(mask1)
        if mask1 != mask2: masks.append(mask2)

for mask in masks:
    cmd = "./maskprocessor-0.73/mp64.bin '{}' -o prepend-append-anywhere.rule".format(mask)
    process = subprocess.Popen(cmd.split(),stdout=subprocess.PIPE)
    output, error = process.communicate()

Results:

Code:
./maskprocessor-0.73/mp64.bin '^?a' -o prepend-append-anywhere.rule
./maskprocessor-0.73/mp64.bin '$?a' -o prepend-append-anywhere.rule
./maskprocessor-0.73/mp64.bin '^?a$?a' -o prepend-append-anywhere.rule
./maskprocessor-0.73/mp64.bin '^?a^?a' -o prepend-append-anywhere.rule
./maskprocessor-0.73/mp64.bin '$?a$?a' -o prepend-append-anywhere.rule
./maskprocessor-0.73/mp64.bin '^?a^?a$?a' -o prepend-append-anywhere.rule
./maskprocessor-0.73/mp64.bin '^?a$?a$?a' -o prepend-append-anywhere.rule
./maskprocessor-0.73/mp64.bin '^?a^?a$?a$?a' -o prepend-append-anywhere.rule

/!\ If you're a beginner like me, be careful with commands like "./maskprocessor-0.73/mp64.bin '^?a^?a^?a^?a$?a$?a$?a$?a' -o prepend-append-anywhere.rule" and any command longer than that, it will fill up your disk space real fast.


Messages In This Thread
RE: Use dictionary word anywhere in the mask - by badagaga - 11-22-2017, 11:42 PM