有没有一种工具可以从任何类型的文件中提取所有字符串?

3
我正在寻找一种替代 wyd 0.2 的工具,可以从任何类型的文件中提取字符串。
谢谢 =)

2
为什么你需要它,以及为什么“wyd”不适合你?如果你提供这些信息,人们可以更好地帮助你。 - dwich
wyd会删除某些字符,比如“:”,但我想保留它。我尝试过编辑代码,但没有成功。 - MKv4
哦,哇,算了吧。我没意识到字符串已经内置在Linux中了:D - MKv4
1个回答

5

字符串

/*填充,因为我需要15个字符*/

编辑 每个*nix中都有一个名为strings的程序,自20世纪80年代末以来一直存在,它就是用来做这件事的。您可以登录到任何*nix中,键入man strings以获取更多信息。或者您可以键入strings -h,显示类似于以下内容:

Usage: strings [option(s)] [file(s)]
Display printable strings in [file(s)] (stdin by default)
The options are:
-a - --all                Scan the entire file, not just the data section
-f --print-file-name      Print the name of the file before each string
-n --bytes=[number]       Locate & print any NUL-terminated sequence of at
-<number>                 least [number] characters (default 4).
-t --radix={o,d,x}        Print the location of the string in base 8, 10 or 16
-o                        An alias for --radix=o
-T --target=<BFDNAME>     Specify the binary file format
-e --encoding={s,S,b,l,B,L} Select character size and endianness:
                        s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} = 32-bit
@<file>                   Read options from <file>
-h --help                 Display this information
-v --version              Print the program's version number

这些选项可以传递给strings,以更改其行为。


需要15个字符是有原因的。 - zvone
@zvonimir @MKv4:这应该可以解决它;-) - mvds
如果你需要更多关于如何使用“strings”的信息,随时联系我。 - mvds

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接