MAC OSX: How to unzip password protected .zip file

12

2

I need to unzip a .zip file which is password protected.

I am able to unzip the .zip file using a windows PC with 7zip.

I tried several tools Keka, iZIP, unarchiver ... and got always an answer like this "...wrong password". But I proofed the password with the windows PC.

So I tried it with commandline, in this way:

unzip -P password my.zip -d my_folder

But I see the following error:

...unsupported compression method 99

So how can I unzip this file under MAC OS X?

Thorsten

Posted 2017-06-23T11:35:23.777

Reputation: 121

Not a real solution, but if you can unzip it on a PC, why not just unzip it there, then put it in a different archive with no password for your Mac? – seagull – 2017-06-23T11:38:42.763

What was used to to create the zip file in the first place? – Kinnectus – 2017-06-23T11:44:35.957

Is there something special about the password - non-standard character set etc? I unzip password-protected zip files all the time, using nothing more than the built-in Unarchiver. – Tetsujin – 2017-06-23T11:44:55.393

Because I will get these archive via e-mail being on road and I only have a windows PC desktop in the office – Thorsten – 2017-06-23T13:05:06.020

No password is plain forward, nothing special. Only standard charakters. – Thorsten – 2017-06-23T13:05:37.343

I do not have configuration used for building the archive. I only know it was made by 7zip. – Thorsten – 2017-06-23T13:06:14.647

Answers

15

unsupported compression method 99

Means the compression algorithm (99 which is AES encryption) isn't supported.

For OSX the only program supporting this I know of it p7zip (Available with brew and other package managers too).

Mikael Kjær

Posted 2017-06-23T11:35:23.777

Reputation: 1 318

No I installed p7zip with Homebrew, did not work. But with new error, "wrong password". But it is the right password, I used c&p. – Thorsten – 2017-06-23T14:20:29.907

1Be careful you didn't copy/paste any whitespaces (space, newline etc). If you're sure of that try a 7z l -slt file.zip – Mikael Kjær – 2017-06-23T14:46:53.940

@Thorsten Also, are there any non-US-ASCII characters (non-English, accented, etc)? If so, you might be running into encoding issues. – Gordon Davisson – 2017-06-23T15:03:03.680

@Mikael, I tried your suggestion, it is quit interesting 7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,8 CPUs x64) ... Path = xxx.zip Type = zip Physical Size = 56311 Path = 2017-105 3_0xxx.docx Folder = - ... Attributes = A Encrypted = + Comment = CRC = 5C27931F Method = AES-256 Deflate Host OS = FAT Version = 20 Volume Index = 0 So for me the archive looks good. – Thorsten – 2017-06-27T14:49:39.037

@Gordon Davisson, yes there is a blank in the password. Is it possible to masquerade it? Perhaps this is problem. – Thorsten – 2017-06-27T14:53:16.527

1@Thorsten you need to escape or quote spaces. These 2 commands will work: 7z -p{"pass word"} x pass_word.zip or 7z -p{pass\ word} x pass_word.zip - The first will quote the password and the second will escape the space. In this case do the same thing. – Mikael Kjær – 2017-06-28T10:01:52.200

My password had "!" in it. For me, neither of these worked: 7z -p{"password!"} x file.zip nor 7z -p{password\!} x file.zip. But running it without -p and entering the password interactively worked well. – mdahlman – 2018-12-07T00:08:04.397

1I also had the issue with the exclamation mark; using -p'password!' worked for me. The double quotes do not hide the special meaning of the exclamation mark from bash, whilst the single quote means that bash will not do anything with what's inside. – donmartin – 2019-01-16T10:43:52.203

0

Keka for Mac os really works perfect with zip protected files (error 1 type or unsupporter compression method 99 in Terminal) > Keka prompt for password then you must fill in something with any letters (eg DEMO), then it does some work, then it tells you it failed...

BUT it did NOT : check it out, your unzipped map is just right there besides your zip file. :-)

Axel Neefs

Posted 2017-06-23T11:35:23.777

Reputation: 1

-1

If you (like me) are trying to unzip ipa file and gets the similar error.

skipping: Payload/App.app/some-file.nib unsupported compression method 99

Check this project https://github.com/sskaje/unzip-lzfse it's worked for me.

It's all about Apple's LZFSE compression:

https://en.wikipedia.org/wiki/LZFSE

https://github.com/lzfse/lzfse

sage444

Posted 2017-06-23T11:35:23.777

Reputation: 99

-1

I had exactly the same issue with a zipped pdf file (pwd protected) from a utilities provider. Tried unsuccessfully with Terminal via command line. In the end I downloaded Keka for Mac, and when I tried to unzip the file using Keka it prompted me for the password, and opened the file! Hope this saves someone else some time.

UnaH

Posted 2017-06-23T11:35:23.777

Reputation: 1