I'm maybe a little bit late but I'm currently trying to develop a program which can brute force a password protected zip archive. First I tried all commands I found in the internet to extract it through cmd... But it never worked....Every time I tried it, the cmd output said, that the key was wrong but it was right. I think they just disenabled this function in a current version.
What I've done to Solve the problem was to download an older 7zip version(4.?) and to use this for extracting through cmd.
This is the command:
"C:/Program Files (86)/old7-zip/7z.exe" x -pKey "C:/YOURE_ZIP_PATH"
The first value("C:/Program Files (86)/old7-zip/7z.exe") has to be the path where you have installed the old 7zip to. The x is for extract and the -p For you're password. Make sure you put your password without any spaces behind the -p! The last value is your zip archive to extract. The destination where the zip is extracted to will be the current path of cmd. You can change it with: cd YOURE_PATH
Now I let execute this command through java with my password trys. Then I check the error output stream of cmd and if it is null-> then the password is right!
-P
is a security vulnerability on multi-user operating systems. It is recommended to use-e
instead. – Siva