muter - tool to convert between various formats
muter [-r] -c chain [file...]
muter [--verbose] --help
muter is a tool to process data by encoding and decoding it in various formats. The series of transforms being used is described by the chain.
Like most Unix command line tools, muter processes the files specified on the command line, or standard input if no files are specified. It produces output to standard output. Input and output are generally assumed to be a series of bytes; where character interpretation is required, UTF-8 is used.
A chain is a series of transforms separated by colons. A reverse transform (decoding) is specified by preceding the transform with a - character. If a transform takes parameters, they are separated by commas and follow the transform either surrounded by parentheses or preceded by a comma. Unknown parameters are ignored.
-
Not all transforms have an reverse transforms. For example, the hash transform, which implements cryptographic hashes, is not practically invertible (we hope). An exception will be thrown if you attempt to use an invalid transform.
Generally, a reverse transform will decode any variant of the forward transform. To preserve this invariant, related but incompatible transforms such as base64 and url64 are separate transforms.
In general, muter expects the input to its decoders to be well-formed. Passing broken or corrupt data will not generally produce useful results. For example, it isn't a good idea to try to decode URI-encoded data containing unencoded newlines. In other words, garbage in, garbage out.
Specify the chain of transforms. This option is mandatory.
Reverse the chain of transforms and convert each forward transform to a reverse transform, and vice versa. Assuming all transforms can be inverted, running an instance of muter without this flag followed by an instance with this flag and with the same chain returns the original data.
It is not valid to specify this flag with transforms that have no inverse.
List usage and all known transforms.
With --help, provide a description for each transform parameter.
The following backends are included with muter; additional backends can be used by creating modules under the App::Muter::Backend namespace in @INC.
App::Muter::Backend
@INC
Implements the Ascii85 encoding.
Equivalent to the hex backend with the upper argument. Implements the RFC 4648 Base16 encoding.
hex
upper
Implements the RFC 4648 Base32 encoding.
Accepts one option, manual, which forces the use of the built-in encoder instead of MIME::Base32. This built-in encoder is forced if MIME::Base32 is missing or too old.
manual
Implements the RFC 4648 Base32 with Extended Hex Alphabet encoding, better known as base32hex.
base32hex
Accept one option, manual, which does the same thing as for base32.
base32
Implements the RFC 4648 Base64 encoding.
Implements a cryptographic hash of the input data. There is no corresponding reverse transform.
The following hash algorithms are supported:
Implements hex encoding. Takes two options, lower and upper, that control which type of letters are used.
lower
Implements the identity transform. Passes through the input unmodified.
Implements quoted-printable MIME encoding. With the option smtp, encodes "." and "From " if they appear at the beginning of a line (including beginning of input).
smtp
Implements URI percent encoding.
Takes three possible options. lower and upper control the type of hex character emitted, and form makes space be encoded as + instead of %20 (as for use in application/x-www-form-urlencoded.
form
+
%20
Implements the RFC 4648 Base64 Encdoing with URL and Filename Safe Alphabet.
Implements UUencoding. Note that the "begin" and "end" markers are not emitted.
Implements the vis(3) function found on the BSDs. The options supported correspond directly to the constants that function takes.
The default encoding, if neither cstyle nor octal is specified, is to encode control characters in the form \^C, control characters with the eighth bit set in the form \M^C, other characters with the eighth bit in the form \M-C, and space and meta-space as octal escapes.
cstyle
octal
\^C
\M^C
\M-C
The flags httpstyle and mimestyle are not implemented. Instead, use the uri and quotedprintable encoders.
httpstyle
mimestyle
uri
quotedprintable
Use C-style backslash escapes for common control characters. Space is encoded as \s. NUL is encoded as \0 if the next character is not an octal digit and \000 if it is.
\s
\0
\000
Encode the characters *, ?, [ and #, which are recognized by glob(3).
*
?
[
#
Encode newline.
Encode characters as three-digit octal escapes.
Encode space (U+0020).
Encode tab.
Encode whitespace. Equivalent to space,tab,nl.
space,tab,nl
Implements encoding of XML special characters. Note that the reverse transform decodes arbitrary decimal and hexadecimal entities into UTF-8.
Takes one of the following three arguments:
Use XML entity names.
Use hexadecimal entity names for all entities.
Use XML entitiy names, except for the apostrophe, which uses a hexadecimal entity.
Decode the standard input as Base64 and output it, encoding it using URI percent-encoding.
Exactly the same as the above.
Read from file, which contains a single hex-encoded string, hash the result with SHA-256, and encode the result as base64. This chain could also be written as -hex:hash,sha256:base64, which may be easier to type.
-hex:hash,sha256:base64
To install App::Muter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Muter
CPAN shell
perl -MCPAN -e shell install App::Muter
For more information on module installation, please visit the detailed CPAN module installation guide.