s cat SOMETHING.DAT |字符串-n 8
我从维基百科得到了这个例子的右半部分;但我希望我能列出所有可以传递给strings
工具的论据。
我正在试图弄清楚如何从.DAT文件中获取一些可用数据,这些文件是由现在已经死亡的人编写的DOS程序的一部分。
/Applications/Xcode.app/Contents/Developer/
Toolchains/XcodeDefault.xctoolchain/usr/bin/strings
[-] [-a] [-o] [-t format] [-number]
[-n number] [[-arch <arch_flag>] ...] [--] [file ...]
这些似乎是可用的参数,但我找不到任何类型的描述或帮助文件。
答案 0 :(得分:1)
Many tools come with a man page, which has a more detailed documentation. You can access it by supplying the tool name as argument. For strings
that is:
man strings
The documentation page also contains the hint that the algorithm used by strings
is quite primitive, so don't raise your hopes too much.
The .DAT extension is used for a lot of things, try loading the file into a hex-viewer and see if that helps (try man hexdump
).
The only reliable way to understand how the file is structured is to trace the execution of the program that reads/writes it (e.g. by looking at the disassembly).