English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Example Cout<< "A" if A==A Cout <<"B" if B==B and on......

2007-02-01 12:48:20 · 5 answers · asked by Jay 3 in Computers & Internet Programming & Design

5 answers

The FOR loop is used when the number of iterations is known. When you don't know how long the loop will run, use DO..WHILE

2007-02-01 13:49:14 · answer #1 · answered by Alan 6 · 0 0

Best thing would be to look at the source for an existing password cracker (there are plenty of open-source ones out there - like John the Ripper, for instance) assuming that you want to write something that uses brute force techniques to crack a password by trying all possible combinations of crypt() ed passwords against an unknown password. Note, it will take *years* to crack unless you a) have access to a supercomputer or b) try a different technique like a dictionary attack which uses pre-encrypted dictionary words. Even then it's not guaranteed unless the unknown password is a dictionary or commonly used word. Which most aren't (or shouldn't be) nowadays.

2007-02-01 21:08:11 · answer #2 · answered by Chay D 3 · 0 0

char passchar;

passchar = a;

for(int i = 0;i<20;i++)
{
if (passchar == a)
cout << "A";
elseif (passchar == b)
cout << "b";
else
cout << "do this"
}

is that what your talking about?

seriously, unless you know the actual number of times you would need to "loop" to get the password cracked, why would you use a for loop?

2007-02-01 21:19:54 · answer #3 · answered by D 4 · 0 0

look on sites like google video ive seen videos on how to do this but im not sure.

2007-02-01 21:02:02 · answer #4 · answered by bosox2312 2 · 0 0

I think you'll need to get more specific to get an answer...

2007-02-01 20:52:25 · answer #5 · answered by fixedinseattle 4 · 1 1

fedest.com, questions and answers