0
我正在开发一个用户提交一些归档样本的门户。我需要检查这些样本是否是受密码保护的压缩文件。我能够检测到这些文件是否被压缩,但我坚持如何检查文件是否受密码保护。有人可以帮忙吗? 我正在使用php。检查压缩文件是否受密码保护
我正在开发一个用户提交一些归档样本的门户。我需要检查这些样本是否是受密码保护的压缩文件。我能够检测到这些文件是否被压缩,但我坚持如何检查文件是否受密码保护。有人可以帮忙吗? 我正在使用php。检查压缩文件是否受密码保护
以下是在RAR technote定义:
Archive header (MAIN_HEAD)
HEAD_FLAGS Bit flags:
2 bytes
0x0040 - Recovery record present
0x0080 - Block headers are encrypted
0x0100 - First volume (set only by RAR 3.0 and later)
File header (File in archive)
HEAD_FLAGS Bit flags:
2 bytes
0x01 - file continued from previous volume
0x02 - file continued in next volume
0x04 - file encrypted with password
因此,检查有关块的标志。