2011-01-24 31 views

回答

0

您可以扫描可打印字符的字符串 - 二进制代码中的大部分字节都是不可打印的,所以当存在并且不间断的字符串(例如6个或更多可打印字符)时,它很可能是真正的字符串值。 Plus字符串通常以\ 0结尾,因此您可以查找以\ 0结尾的可打印字符串。

2

您可以使用strings(1)将文件中可打印字符的字符串提取到文件或管道,然后处理这些行。例如:

$ strings werl.exe 
!This program cannot be run in DOS mode. 
Rich 
.text 
`.rdata 
@.data 
.rsrc 
QRVh 
Could not load module %s. 
win_erlexec 
Could not find entry point "win_erlexec" in %s. 
Could not find key %s in section %s of file %s 
Cannot find erlexec.exe 
erts-* 
\bin 
erts- 

对此输出保存到一个文件out.txt,你使用重定向:

$ strings werl.exe > out.txt