fragglet / lhasa

Free Software LHA implementation
http://fragglet.github.io/lhasa/
ISC License
83 stars 15 forks source link

Can't extract password protected LZH archives #3

Closed baskerville closed 12 years ago

baskerville commented 13 years ago

It seems password protected LZH archives are not handled. For example: http://www.mediafire.com/?j97h7r7bniu74gi

fragglet commented 13 years ago

Hi,

Thanks for the bug report. Are you sure that file is password protected? The Unix LHA tool extracts it without prompting for a password. Furthermore, none of the LHA tools I have seem to support a password option, as far as I can tell.

Lhasa will currently fail to extract that archive because it doesn't have a working -lh5- decoder yet (I'm working on it).

I sent an email reply to your first bug report about make failing, but I think you didn't receive it. Here is a copy of the email, for reference:


Thanks very much for the bug report. I've pushed out a change that I think should fix the cause of the problem, though I don't have an Arch Linux machine so I can't test for certain.

Lhasa is currently still in pretty early alpha stages, if you were hoping to use it as a replacement for LHA you might find it's not quite ready yet. Crucially I haven't yet written a decoder for the algorithm[s] used in modern LHA archives. But otherwise I'd certainly love to hear any feedback you might have.

Thanks!

baskerville commented 13 years ago

Thanks for the bug report. Are you sure that file is password protected? The Unix LHA tool extracts it without prompting for a password. Furthermore, none of the LHA tools I have seem to support a password option, as far as I can tell.

In fact, I'm not sure about this one, but there's absolutely no doubts that password protected LZH files exist, you'll find plenty of them at 4chan:

http://rs.4chan.org/?s=lzh

I sent an email reply to your first bug report about make failing, but I think you didn't receive it.

No, I didn't, and I don't know why... Greetings.

fragglet commented 13 years ago

Okay, I downloaded a few .lzh files from 4chan that had passwords listed next to them, but I was able to extract them all without having to enter a password. Can you provide a specific example of a .lzh file that is password encrypted? Ideally one that you're unable to extract using the Unix LHA tool...

baskerville commented 13 years ago

Okay, I downloaded a few .lzh files from 4chan that had passwords listed next to them, but I was able to extract them all without having to enter a password. Can you provide a specific example of a .lzh file that is password encrypted? Ideally one that you're unable to extract using the Unix LHA tool...

Well, if the password is optional, that's perfectly fine with me. However, I'm not willing to install 'Unix LHA tool' (that's why I came here in the first place) but I'd be glad to test you lh5 implementation whenever it would be ready.

Cheers.

fragglet commented 12 years ago

Hi,

The latest version of the code now supports lh5, lh6 and lh7 so it should be able to extract most archives. If you can provide an example of a specific archive that you think is encrypted I'd be interested to see it, otherwise I'd like to close this bug.

baskerville commented 12 years ago

The latest version of the code now supports lh5, lh6 and lh7 so it should be able to extract most archives. If you can provide an example of a specific archive that you think is encrypted I'd be interested to see it, otherwise I'd like to close this bug.

That's great!

I found an lh5 which is supposed to be encrypted:

http://ge.tt/8HjjB8B/v/0

The pass is: le01

I can get the file listing with:

lha l foo.lzh

But

lha x foo.lzh

Fails without any error message.

fragglet commented 12 years ago

Thanks. This isn't an encrypted archive either though, I'm afraid.

If you look inside the archive you'll find that the compressed files are inside directories. If you manually create these directories then "lha x" will succeed in extracting the files. There's a bug in the extract code at the moment that means the directories aren't created automatically - the command line tool is only very basic and incomplete at the moment because I've been focusing on making the backend parts work properly (ie. the actual decompression).

I must admit I'm very skeptical of the claim that password-protected lha files even exist. In the past few months I've done a lot of research into the file format and used many different versions of the tool from different operating systems and platforms, and I haven't seen a single one that appeared to have an encryption option.

baskerville commented 12 years ago

If you look inside the archive you'll find that the compressed files are inside directories. If you manually create these directories then "lha x" will succeed in extracting the files. There's a bug in the extract code at the moment that means the directories aren't created automatically - the command line tool is only very basic and incomplete at the moment because I've been focusing on making the backend parts work properly (ie. the actual decompression).

I confirm.

I must admit I'm very skeptical of the claim that password-protected lha files even exist. In the past few months I've done a lot of research into the file format and used many different versions of the tool from different operating systems and platforms, and I haven't seen a single one that appeared to have an encryption option.

I think it's safe to close then.

Greetings.

fragglet commented 12 years ago

Thanks again for the report!