CRYPDOCTOR ANYONE HELPPP!
|
|||
|
Rank: Unregistered
|
Hello guys.
It's been a while since my last post here. anyways could any of you help me out on how to create a code for finding all the possible combinations that can be made out of 26 lowercase letters chosing 5 letters at the time. it'll be something like this 1.) 26x26x26x26x26 = 11,881,316 combinations allowing every letter to be repeated that is aaaaa , aaaab cdtaa... 2.) output the results to a txt file. the code is to be compiled in c++ any help would be greatly appreciated. thanks in advance YOU GUYS ARE MY LAST HOPE! |
||
|
|||
|
|||
|
Rank: ? (614)
Member #: 9832 |
five nested loops is all you need.
First create an array for your five letters: char* combs=new char[5]; then get a list of numeric values for ascii chars. I think smallcase letters are listed one after another so it's gonna be like 94 to 120 or something like that. Anyway, check that, then loop: for(int i=94/*(or something)*/;i<120;i++) { combs[0]=i; for(int j=94/*(or something)*/;j<120;j++) { combs[1]=j; OK, get the idea? five nested loops, these are two first. inside the final loop, print the whole combs-array: printf("%s", combs); instead of messing with files inside the code its probably easier to print the combinations and redirect them to file when executing: <command prompt>combs.exe >combs.txt This actually looks like some naughty password-breaking scheme, but if you are testing for 5 lowercase character passwords you can't possibly be attacking anything serious... If the ascii-values for lowercase chars are not one after another, then you'd have to make your own list. EDIT: I just noticed that you posted this all over the site. Please don't do that, the post WILL be noticed by someone even if it is posted only once and multiple posts only irritate people and make it LESS likely that someone would answer...
Chaos reigns within - Reflect, repent, and reboot - Order shall return
|
||
|
Please login or register to post a reply.