解压未知编码做密码的压缩包 Unzip with unicode password in unknown charset

Some chinese idiots love using non-standard charset. For example, "360 secure archive" is using EUC-CN. They are trying to force everyone to install their shits, but we can crack it.

一些中国的白痴软件公司喜欢使用非标准的字符集. 例如, "360安全压缩"喜爱使用EUC-CN. 他们竭尽全力的试图强迫所有人安装自己生产的大便, 但是我们可以破解它.

Fill variables and run this bash script. All you need is iconv and unzip.

填充变量并运行这个bash脚本. 你只需要有iconv和unzip就够了.

# Input in UTF-8
password='密码'
zip=1.zip

target_codes=(
    UTF-8 UTF-16 UTF-16BE UTF-16LE ISO-8859-1 ISO-2022-JP ISO-2022-CN SHIFT-JIS EUC-CN EUC-JP EUC-JP-MS EUCJP BIG5 CN CN-GB CN-BIG5 GB2312 GB18030 GBK EUC-KR ISO-2022-KR JOHAB
)

for target in "${target_codes[@]}"; do
    echo TRYING $target
    unzip -P $(printf "$password" | iconv -f UTF-8 -t $target) "$zip" && break
done

This script is designed for Chinese characters. Add more codesets as your will.