0

Note: I'm not going to put output of commands because thread will be very long.

Solutions I have already tried didn't succeeded to make the desired output. If anybody knows is it possible to get a wordlist of passwords that are 8 characters long (only Uppercase letters, no numbers, no special characters), but without repeating letters in a line, for example:

QWERTYUI →→→ good
QQWERTYU →→→ bad
QQQWERTY →→→ bad
QQQQWERT →→→ bad
QQQQQWER →→→ bad
QQQQQQWE →→→ bad
QQQQQQQW →→→ bad

Is there any options with "John The Ripper" to make output wordlist like above or maybe pipe to aircrack-ng? I've tried crunch and didn't manage to do that. If is possible I would like to know?

2 Answers2

1

If you have a file with words, and you'd like to delete all words that contain repeated characters, then this will do that for you:

$ cat file
HELLO
WORLD

$ sed '/\(.\)\1/d' file
WORLD

This could be part of a pipeline:

$ generate_words | sed '/\(.\)\1/d' | use_words

Where generate_words is some program that generates words, one per line, on standard output, and use_words is some program that reads words, one per line, from standard input.

The regular expression \(.\)\1 will match any line of input that contains twe consecutive characters that are the same. The d command of sed will delete such lines.

Kusalananda
  • 320,670
  • 36
  • 633
  • 936
  • Is this possible to accomplish without file with words? –  Apr 05 '17 at 14:25
  • 1
    One way would be to generate all permutations of all 8-combinations from `string.ascii_uppercase` in Python. – Kalvin Lee Apr 05 '17 at 14:28
  • Since I haven't used the tools that you mention, I don't know if it's possible to modify the behaviour of them. The pipeline that I included does not use a separate file of words. – Kusalananda Apr 05 '17 at 14:29
  • 1
    Ah. I see what the actual question is now... You want to _generate_ the words. My bad, I misunderstood the problem. I'll leave this here in case it help someone else though. – Kusalananda Apr 05 '17 at 14:30
  • 1
    @Kusalananda this is helpful as well –  Apr 05 '17 at 14:32
0
while < /dev/urandom tr -cd 'A-Z' | fold -w8 | sed '/\(.\).*\1/d;q1'; do :; done

Here we pick only capital letter chars from /dev/urandom file and put it in a while loop & keep at it till we see no repeat chars. Note this requires GNU sed.