hashdig-harvest.pl - Harvest hashes from a one or more files
hashdig-harvest.pl [-a hash-type] [-c {K|U}] [-d delimiter] [-h hash-field] [-q] [-s file] [-T dir] -t file-type -o {file|-} file [file ...]
This utility extracts hashes of the specified hash-type from
one or more input files of the specified file-type, tags them (see
-c), and writes them to the specified output file (see -o).
Output is a sorted list of hash/category pairs having the following
format:
hash|category
- -a hash-type
-
Specifies the type of hashes that are to be harvested. Currently, the
following hash types (or algorithms) are supported: 'MD5', 'SHA1', and
'SHA256'. The default hash type is that specified by the HASH_TYPE
environment variable or 'MD5' if HASH_TYPE is not set. The value for
this option is not case sensitive.
- -c category
-
Specifies the category, {K|U}, that is to be assigned to each hash.
Currently, the following categories are supported: known (K) and
unknown (U). The default category is unknown. The value for this
option is not case sensitive.
- -d delimiter
-
Specifies the input field delimiter. This option is ignored unless
used in conjunction with the GENERIC data type. Valid delimiters
include the following characters: tab '\t', space ' ', comma ',',
semi-colon ';', and pipe '|'. The default delimiter is a pipe. Note
that parse errors are likely to occur if the specified delimiter
appears in any of the field values.
- -h hash-field
-
Specifies the name of the field that contains the hash value. This
option is ignored unless used in conjunction with the GENERIC data
type. The default value for this option is ``hash''.
- -o {file|-}
-
Specifies the name of the output file. A value of '-' will cause
the program to write to stdout.
- -q
-
Don't report errors (i.e., be quiet) while processing files.
- -s file
-
Specifies the name of an alternate sort utility. Relative paths are
affected by your PATH environment variable. Alternate sort utilities
must support the
-o, -T and -u options. This program was
designed to work with GNU sort.
- -T dir
-
Specifies the directory sort should use as a temporary work area.
The default directory is that specified by the TMPDIR environment
variable or /tmp if TMPDIR is not set.
- -t file-type
-
Specifies the type of files that are to be processed. All files
processed in a given invocation must be of the same type. Currently,
the following types are supported: FTIMES, FTK, GENERIC,
HK|HASHKEEPER, KG|KNOWNGOODS, MD5, MD5DEEP, MD5SUM, NSRL1, NSRL2,
OPENSSL, PLAIN, RPM, SHA1, SHA1DEEP, SHA1SUM, SHA256, SHA256DEEP, and
SHA256SUM. The value for this option is not case sensitive.
Klayton Monroe
ftimes(1), hashdig-make(1), md5(1), md5sum(1), md5deep(1), openssl(1), rpm(8), sha1(1), sha1sum(1), sha1deep(1)
All documentation and code are distributed under same terms and
conditions as FTimes.
|