可以,strings 本身是可以查到中文(中文字符)的,但有几个关键点你要注意:
strings 的作用是从二进制文件中提取“可打印字符序列”。
中文在文件中通常以如下编码存在:
只要字符在文件里是“连续可打印字节”,strings 就能提取出来。
strings test.bin | grep 中文
✔ 基本没问题
✔ Linux / 开源软件 / 安卓 so / ELF 常见
strings 不关心编码,它只按字节提取:
strings file.exe
如果你看到的是乱码(比如 ����),那通常是 GBK 编码。
用 iconv 转码:
strings file.exe | iconv -f GBK -t UTF-8
Windows 程序常把中文字符串存成 UTF-16(宽字符)。
-e 参数strings -e l file.exe # UTF-16LE
strings -e b file.exe # UTF-16BE
strings -e l file.exe | grep 中文
strings -n 4 file # 最小长度 4
strings -e l file # 宽字符
strings -a file # 扫描整个文件(不止 .data)
✅ Linux 的 strings 可以查中文
⚠ 但要看编码:
-e l如果你有具体文件类型(ELF / exe / so / bin),我可以给你更精确的命令。