I have been trying to write a simple brute force password cracker in C++ to open an old zip file that I locked a very long time ago.
I am trying to call pkunzip from the program. The only way I know to do this is using the system() command. As in system("astring");. The problem is that I need to dump a new password into the string each time over and over until I get a hit. That would require inserting a variable into to command that I am sending to DOS. That is where I get lost. So the code could look something like this...
system("pkunzip lockedFile -s[the password variable here]")
Also, this entire idea may be horrible, so if there is a better way then please just say.
Also, can I use a cd\ command to get to the proper directory, or do you just have to dump the relevant files in the same directory as the C++ project itself. Any help or general pointers would be much appreciated. m.hatter