ok so our teacher gae us a challenge we have to find/make a password cracker that can crack a numeric password that you enter into the program and was wondering if any of you out there have a code you could send me or give me and example
i actually just made one myself, although it's way over-kill for what you're trying to do. does she have a set length for the password that you're attempting to crack?
haha yeah, you're not gettin my code. i was just going to get you going in the right direction.
also, like duoas said, it makes things MUCH easier, if you right down a conceptual program on a sheet of paper first. basically just make a flow chart of how it works, and then fill in the gaps.
so do i basically just tell th eprogram to scanf 0000 then 0001 and so on until i get to 9999 and when it hits that number it cracks it or how do i go about doing that
You would simply check to see if each number is the correct one. You would do so until you get the correct number.
Let's say the password is 3456.
You're program should start at 0000 (or 9999, it doesn't matter), check to see if it's the correct password, and if not, add one and try again. This is your basic brute force.
The truth is that this is unspecified problem as it stands. What is this "cracker" supposed to do - interact with a human adversary (what everyone is guessing from the usual nature of exercise problems), crack zip files, hack into CIA or crack walnuts? I mean if she gave you the task in this exact wording then she meant to give you some personal research work in the way or she wanted something simple, or anything will do.
Sorry about the gender thing. I am somehow accustomed to female teaching assistants. But I read the "enter into the program" part before and this is not suitable description. What is the program? You write another program and the cracking app is supposed to pipe into it and try to "log in". Or does this mean to crack a password that is given to your app directly or to some other app? I am sorry if I don't make sense. Still, I am glad that the other guys get it though.
Or cheat: When the user enters the password it writes the password to a file. Then, you read from the file. This gives you the users password Lol. Seriously, don't do that. Computerquip has the right idea.