hops / pack2

MIT License
34 stars 2 forks source link

option: mask list set operations #8

Open roycewilliams opened 4 years ago

roycewilliams commented 4 years ago

Would be super useful to have a general way to merge, split, expand, and detect overlap in lists of masks.

For example, these masks:

?l?l?l?l?l?l?l
?l?l?l?l?l?l?u
?l?l?l?l?l?l?d
?l?l?l?l?l?l?s

... could be merged to:

?l?l?l?l?l?l?a

"Splitting" would be the opposite - turning ?a into its components.

Expanding could also be useful, perhaps with thresholding that is a little more sophisticated, based on target keyspace or runtime. For example:

?l?l?l?l?l

... could be split to:

?l?l?l?la
?l?l?l?lb
?l?l?l?lc
[etc]

... to fit a specific target runtime (--PPS).

roycewilliams commented 4 years ago

It would also be highly useful to be able to merge two lists of masks that include frequency data.

For example, merging these two lists:

?l?l?l?l?l?l?l,25
?l?l?l?l?l?l?u,20
?l?l?l?l?l?l?d,15
?l?l?l?l?l?l?s,10
?l?l?l?l?l?l?l,3
?l?l?l?l?l?l?u,8
?l?l?l?l?l?l?d,7
?l?l?l?l?l?l?s,6

... would yield:

?l?l?l?l?l?l?l,28
?l?l?l?l?l?l?u,28
?l?l?l?l?l?l?d,22
?l?l?l?l?l?l?s,16

Not sure if this should be part of this enhancement, or a separate one?