Есть ли инструмент, который может извлечь все строки из любого типа файла? - PullRequest
2 голосов
/ 19 июля 2010

Я ищу альтернативу wyd 0.2 , которая может извлекать строки из любого типа файла, с которым встречается.

спасибо =)

1 Ответ

3 голосов
/ 19 июля 2010

strings

/ * заполнение, потому что мне нужно 15 символов * /

edit Существует программа под названием strings в каждом * nix, начиная с конца 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, чтобы изменить его поведение.

...