Using crunch to create an Israeli phone numbers list
Solution 1:
The manual is somewhat misleading. It states:
crunch <min-len> <max-len> [<charset string>] [options]
[…]
charset string
You may specify character sets for crunch to use on the command line or if you leave it blank crunch will use the default character sets. The order MUST BE lower case characters, upper case characters, numbers, and then symbols. […][…]
-t @,%^
Specifies a pattern, eg:@@god@@@@
where the only the@
's,,
's,%
's, and^
's will change.
@
will insert lower case characters,
will insert upper case characters%
will insert numbers^
will insert symbols
Important fact: where the manual says "lower case characters", "upper case characters", "numbers", and "symbols", it could say "set 1", "set 2", "set 3" and "set 4". The default sets correspond to the terms the manual uses, respectively, but aside from this "lower case characters" is just an abstract "set 1". In this context @
refers to "set 1" and %
refers to "set 3".
You defined the first set as 0123456789
, these are not lower case characters, yet it works. The tool doesn't check if "set 1" or "lower case characters" are indeed lower case characters.
Now you need an additional set, a limited one. Let's redefine "upper case characters" ("set 2"):
crunch 10 10 0123456789 023458 -o phone_numbers -t 05,@@@@@@@
And that's it. Now the third character of the output is generated from an independent set.