I'm trying to do a bruteforce attack on a rar archive and I need the password-check to be as fast as possible. I call rarlab's "unrar" command line utility from my program in this way:
unrar t -p[password] archive.rar
And it works, but is extremely slow. The encrypted file inside the archive is about 300MB big, and unrar utility tells me there's a CRC error (wrong password) only after testing the whole file size. (which takes 10-15 secs)
Is there a quicker way to test just the archive password?
Look with rar l
if the archive contains more files than the "main" file you'd like to extract. There are usually .txt or .nfo files contained in the archive with few KB-s. You can then execute brute force attack to extract only the smallest file in archive with rar -ppassword x <archive> <file>
what should be much faster.