I am looking for the bit flags to detect the file is password-protected, not a regular .zip or .rar.
|
| ||||
feedback
|
|
You can use zipinfo and unrar to test whether a ZIP file is encrypted. E.g.:
| |||
|
feedback
|
|
You can read about the header structure of rar here And about the zip header structure here It helps to download the source code of opensource unpackers to read some code examples. | |||
|
feedback
|