OlehKulykov / PLzmaSDK

PLzmaSDK is (Portable, Patched, Package, cross-P-latform) Lzma SDK.
Other
85 stars 25 forks source link

Detect password protected files #15

Closed AnukritiJain19 closed 2 years ago

AnukritiJain19 commented 2 years ago

How can i detect a password protected file ?

Can you suggest a way to handle the password protected files. The exception description says "can't open in archive". I am extracting the file and checking that, if it is not getting extracted then displaying a "enter password" prompt. But if it is not getting extracted for some other reason , then how can i know ?

Any API available for Password Protected files other than setPassword() ?

OlehKulykov commented 2 years ago

Hi, you can't detect if it's a password-protected archive, you should know it(!!!), to avoid brute force attack within this lib/framework. This is an idea of this repo.

ezwardChou commented 2 years ago

Hi, is there an indirect way to tell if a file is password protected?

OlehKulykov commented 2 years ago

Hi, also no.