Use dictionary word anywhere in the mask
#8
Small fix to the Python snippet as single-quotes don't do well with Popen/split (they end up in the rules file):

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()


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