1

How can I have Crunch create a password list where the passwords contain no duplicate characters at all?

eg. I currently have

crunch 3 3 ABCDEFGHIJKLMNOPQRSTUVWXYZ -d 1

which prevents 'ZZZ' but allows 'ZYZ'.

I wish to also exclude passwords like 'ZYZ' or 'ABA'.

Is this possible?

schroeder
  • 123,438
  • 55
  • 284
  • 319
flames500
  • 11
  • 2
  • Looking at the man page, not it is not possible. But this would be a very, very simple programming scripting task to iterate over the letters like you want. – schroeder Oct 28 '19 at 13:53
  • @MechMK1 it depends on where the OP wants to go with this. If the goal is to create the wordlist, then this is a programming question. If the desire is to get this very specific tool to do this, then it's a very, very short answer. – schroeder Oct 28 '19 at 14:31
  • The goal is to create the wordlist. My programming skills are sadly non-existent so even very, very simple will likely be beyond me; I just thought I might me missing something obvious in crunch that would do it. The -p function almost does, but then it ignores the defined length. Thanks for the answer anyway. – flames500 Oct 28 '19 at 14:43
  • @MechMK1 X/Y problems are the norm, not the exception, unfortunately. My comment was not an answer but a proposal to gauge a reaction. I'm the 4th most common answerer here on Sec.SE. I'm not afraid to post answers, but I want to make sure that I'm answering the right question. – schroeder Oct 28 '19 at 14:59
  • @flames500 You can write a script to do that, but what do you exactly want to do: 1) create a passlist from scratch? 2) Modify Crunch passlist so that it **doesn't contain** passwords with double chars at all? 3) Modify such passwords from Crunch passlist (_not remove them_) so that the don't contain duplicate characters? 4) Something else?? – game0ver Oct 28 '19 at 15:37
  • @game0ver I would not know where to start with any of those options but option 1 seems the neatest way. My new plan is to try and figure out how to use https://github.com/skriachko/scrunch as it seems to include the functionality I am looking for. Thanks for your answer. – flames500 Oct 28 '19 at 15:49

1 Answers1

1

Crunch is not designed for that option. It also doesn't make sense that it would. Password list generators need to create very large lists that match patterns. Your request is a constraint.

For password lists that require such constraints, it is better to write your own script.

schroeder
  • 123,438
  • 55
  • 284
  • 319
  • Aren't patterns just nonpatterns with constraints? What is "-d Limits the number of duplicate characters" if not a constraint? Fair enough it doesn't include the functionality I was hoping for, but I'm not sure it can be said that there's a difference in principle between the included 'only x consecutive duplicate characters' constraint and the desired 'only x duplicate characters' constraint. – flames500 Oct 28 '19 at 15:30