0

I have a small wordlist of 100 words (unwanted strings) saved in a file called file01.

I would like to use crunch to generate wordlist of 10 characters, but I want to delete all the lines in file01 from the new crunch's generated wordlist before saving it, to reduce the size of the newly generated file.

What would syntax for that crunch command be?

  • 1
    Hi @Ahmed, kindly would you please add more clarifications to the question. Please see the answer below and we can modify depending on your needs – user88036 Sep 25 '18 at 18:22
2

The syntax for Crunch is:

crunch min max charset options

The min and max are the minimum and maximum lengths (respectively) for your desired wordlist. By default charset is not required, but you can use it to limit the characters of your wordlist to the ones you specify. If you choose to use charset then you must maintain the correct order, which is lowUP123@%# (lowercase letters, then uppercase letters, then numbers and finally symbols). You can skip any of them, but the order must always remain the same.

For example:

crunch 2 6 qrs347 | grep -vFf file01

The command above will produce a wordlist for every possible combination of the characters qrs347 from 2 to 6 characters in length.

You can modify the command depending on your needs

  • 2
    if I'm interpreting the OP correctly, I think the solution they're looking for would be crunch ... | grep -vFf file01, assuming crunch outputs to stdout vs writing a file. – Jeff Schaller Sep 25 '18 at 18:16
  • 2
    You are almost always correct @JeffSchaller ;-) – user88036 Sep 25 '18 at 18:19
  • 1
    Thank you very much your command is going good with me i already found a command that to pipe crunch output to sed as: crunch 10 10 abcde123456 | sed '/string1/d ; /string2/d ......' > Fileout – Ahmed Sep 25 '18 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.