I'm creating a wordlist with uppercase letters A-Z and numbers 0-9. The length is exactly 8 characters long. Using the tool crunch, preinstalled in Kali, I was able to generate a wordlist that doesn't contain any consecutive characters, for example: 'ABCDEF12' would be generated but 'AABBCC11' wouldn't be generated because it contains consecutive characters.
The command used: crunch 8 8 ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 -d 1
I still need to filter down this wordlist by excluding any more than 2 occurrences of the same character, for example: ABCA12AB would be excluded because the letters 'A' and 'B' occur 3 times, and I only want them to occur 2 times maximum.
There isn't any option within crunch to do this, and I've tried looking up regex to filter the results but I'm very new to regex and couldn't figure it out.