_DEFINE P AS STRING
DIM PossibleLetters AS STRING
PossibleLetters = "abc"
$CONSOLE:ONLY
_DEST _CONSOLE
FOR a = 1 TO LEN(PossibleLetters)
Password = ""
Password = MID$(PossibleLetters, a, 1)
FOR b = 1 TO LEN(PossibleLetters)
Password2 = Password + MID$(PossibleLetters, b, 1)
FOR c = 1 TO LEN(PossibleLetters)
Password3 = CHR$(34) + Password2 + MID$(PossibleLetters, c, 1) + CHR$(34)
C$ = "7za e TestArchive.7z -p" + Password3
PRINT Password3, C$
SHELL C$
NEXT c, b, a
I'd suggest downloading the archive below, and extracting it to a RAM drive of minute size to play around with it.
Instructions:
1) Download
2) Extract to a dedicated directory
3) Run the 7z Test Cracker.exe, and you can see where it brute forces the test archive and breaks the password on it.. (Which, in this case, is simply nothing more than "abc", which allows me to very quickly run through a list of all the possible word/letter combinations.)
4) Try not to OOOOH, as one of the QB64 license TXT files suddenly pops up in the directory chosen. You've now broken a 7z password! Yaaaaaay!!