Random Number generator

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: Random Number generator

Post by MarauderIIC »

Brute forcing a password will get you nowhere. If it's just five characters long and can be a-z, A-Z, 0-9, and the 32 symbols on the kb (I think, quick count), then there are

26 + 26 + 10 + 32 = 52 + 42 = 94 possibilities for each character, so you have a total of
94 * 94 * 94 * 94 * 94 = 7339040224 different password possibilities
94 possibilities for the first char can be paired with any of the 94 chars in the second char and any of those can be paired with the 94 chars of the third, etc (hence the multiplication).

Of course, if you don't know the length, it's even harder. The problem is quickly becomes infeasible due to time -- send & check response, not to mention the password generation itself.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
NeonNinja♦
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 38
Joined: Sat Oct 25, 2008 4:55 pm
Location: Under your bed eating your couch :D

Re: Random Number generator

Post by NeonNinja♦ »

Oh :lol: I understood some of it, but i guess its not worth it lol :P
"Java is C++ without the guns, knives, and clubs" <------- So true.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Random Number generator

Post by dandymcgee »

Just a quick note: It's probably in your best interest to use cin.get(); as opposed to system("PAUSE"); when wanting a console application to wait for user input.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: Random Number generator

Post by Falco Girgis »

Yeah, "system()" is not platform independent.
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: Random Number generator

Post by avansc »

MarauderIIC wrote:Brute forcing a password will get you nowhere. If it's just five characters long and can be a-z, A-Z, 0-9, and the 32 symbols on the kb (I think, quick count), then there are

26 + 26 + 10 + 32 = 52 + 42 = 94 possibilities for each character, so you have a total of
94 * 94 * 94 * 94 * 94 = 7339040224 different password possibilities
94 possibilities for the first char can be paired with any of the 94 chars in the second char and any of those can be paired with the 94 chars of the third, etc (hence the multiplication).

Of course, if you don't know the length, it's even harder. The problem is quickly becomes infeasible due to time -- send & check response, not to mention the password generation itself.
this is generally true, but it depends what password you are trying to crack. let say its a windowsXp user password. there is a file called the sam file, its in the windows/system/somewhere folder. anyways, this contains the passwords. but it contains the has of the passwords. well not exactly. if the password is less than 14 chars. its actually just encrypted with DES and the secret key windows uses is known, so cracking that password is pretty easy. and if its longet is is an actual has i think its called the NT LM hash. but is still very easily cracked.

there is a program called lophtcrack. will get you the passwords in a day or so.

and getting the sam file is not that hard.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Post Reply