.TH "guncat" "1" "2014\-2018" "guncat_1\&.02\&.00\&.tar\&.gz" "guncat \- unencrypting file concatenation" .PP .SH "NAME" guncat \- catenates files, unencrypting pgp encrypted sections .PP .SH "SYNOPSIS" \fBguncat\fP [OPTIONS] [file(s)] .br [OPTIONS] \- cf\&. section \fBOPTIONS\fP .br [file(s)] \- optional files to process (cf\&. section \fBINPUT FILE(S)\fP) .br .PP .SH "DESCRIPTION" .PP \fBGuncat\fP was designed to tackle a problem encountered with (partically) PGP encrypted files (which may be encountered in, e\&.g\&., mailboxes)\&. Tools to process text\-files (like \fBgrep\fP(1), or \fBless\fP(1)) may be used to process those files, but standard tools like \fBcat\fP(1) leave PGP encrypted sections within such files as\-is\&. As a consequence, browsing the `real\(cq\& contents (i\&.e\&., clear\-text sections and the unencrypted contents of PGP encrypted sections) of those files is difficult\&. .PP \fBGuncat\fP acts comparably to \fBcat\fP, but unencrypts encrypted sections encountered in the files processed by \fBguncat\fP, copying the unencrypted information to \fBguncat\fP\(cq\&s standard output stream, which may thereupon be processed by other tools\&. .PP PGP/GPG encrypted sections are surrounded by .nf \-\-\-\-\-BEGIN PGP MESSAGE\-\-\-\-\- .fi and .nf \-\-\-\-\-END PGP MESSAGE\-\-\-\-\- .fi markers\&. Whenever \fBguncat\fP encounters such sections they will be processed by \fBgpg\fP(1)\&. \fBGpg\fP needs a passphrase to unencrypt such sections\&. The required passphrase may be provided to \fBguncat\fP, which then forwards the passphrase to \fBgpg\fP\&. .PP When providing an incorrect passphrase to \fBguncat\fP two additional attempts to provide the correct passphrase are provided\&. If the third attempt also fails, \fBguncat\fP terminates\&. Furthermore, when an incorrect passphrase is provided, the currently processed file must be reset to the beginning of the encrypted section\&. This implies that the processed file must be \fIseekable\fP\&. If the file does not support seeking operations then \fBguncat\fP also terminates\&. .PP .SH "RETURN VALUE" .PP \fBGuncat\fP returns 0 to the operating system unless an error occurs (0 is also returned when the option \-\-show\-gpg) is specified\&. .PP .SH "INPUT FILE(S)" .PP When no file arguments are provided (or when \- is provided) the standard input stream is processed\&. .PP When option \-\-passphrase is specified the first line of the first file that is processed is read as the passphrase to use\&. When a thus specified passphrase is incorrect, \fBguncat\fP terminates\&. .PP Any other argument is considered a file (path specifications are allowed) to be processed in sequence by \fBguncat\fP\&. .PP If an argument does not refer to a readable file, \fBguncat\fP terminates with an error message\&. .PP .SH "OPTIONS" .PP Where available, single letter options are listed between parentheses following their associated long\-option variants\&. Single letter options require arguments if their associated long options require arguments as well\&. .IP o \fB\-\-errors\-OK\fP .br When specifying the option \-\-errors\-OK the input \fBs\fP continue to be processed even if \fBgpg\fP returns a non\-zero exit value\&. .IP .IP o \fB\-\-gpg\fP=path .br Path to the \fBgpg\fP program (default: /usr/bin/gpg) .IP .IP o \fB\-\-gpg\-msg\fP=path (\fB\-m\fP) .br Path to where \fBgpg\fP and \fBguncat\fP should write messages\&. Specify \- to write the messages to the standard error stream\&. By default messages are suppressed\&. .IP .IP o \fB\-\-gpg\-no\-batch\fP .br Starting with \fBguncat\fP version 1\&.02\&.00 this option is not used anymore\&. It will be removed in a future vestion\&. .IP .IP o \fB\-\-gpg\-option\fP=option (\fB\-m\fP) .br Add option to \fBgpg\fP\(cq\&s call\&. If the option contains blanks, surround option by single or double quotes\&. Option gpg\-option may repeatedly be specified\&. .IP .IP o \fB\-\-help\fP (\fB\-h\fP) .br Basic usage information is written to the standard output stream\&. .IP .IP o \fB\-\-locate\-keys\fP \fB\-l\fP .br Starting with \fBgpg\fP version 1\&.02\&.00 this option is not used anymore\&. It will be removed in a future vestion\&. .IP .IP o \fB\-\-passphrase\fP \fB\-p\fP .br By default the passphrase is read by \fBguncat\fP after prompting the user to enter the passphrase\&. The passphrase is not echoed\&. If input redirection is used or if input files are specified option \-\-passphrase can be specified to read the passphrase from the first line of the first input stream that is read by \fBguncat\fP\&. In that case the input stream\(cq\&s first line is (of course) not written to the output stream\&. When the \-\-passphrase option is specified and the provided password is incorrect, \fBguncat\fP terminates\&. .IP .IP o \fB\-\-show\-gpg\fP .br Show the gpg command that would be used, and quit, returning 0\&. .IP .IP o \fB\-\-time\-limit\fP=seconds (\fB\-T\fP) .br Option \-\-time\-limit is used to specify the max\&. time in seconds that \fBgpg\fP is allowed to run while decrypting a single encrypted section\&. By default no time limit is used\&. This option is useful when the file to process might contain errors in encrypted sections (like a missing END PGP MESSAGE line)\&. .IP .IP o \fB\-\-tty\-OK\fP \fB\-t\fP .br Option \-\-no\-tty is not specified when calling \fBgpg\fP\&. By default it is specified\&. .IP .IP o \fB\-\-verbose\fP=[0\-2] .br Specifies \fBgpg\fP\(cq\&s verbosity level\&. When calling \fBgpg\fP, by default \-\-quiet is specified; with \-\-verbose 0 \fBgpg\fP\(cq\&s option \-\-no\-verbose is specified; otherwise \-\-verbose is specified once or twice\&. .IP .IP o \fB\-\-version\fP (\fB\-v\fP) .br \fBGuncat\fP\(cq\&s version number is written to the standard output stream\&. .PP .SH "SEE ALSO" .PP \fBcat\fP(1), \fBgpg\fP(1), \fBgrep\fP(1), \fBless\fP(1)\&. .PP .SH "BUGS" None reported .PP .SH "COPYRIGHT" This is free software, distributed under the terms of the `GNU General Public License\(cq\&\&. Copyright remains with the author\&. \fBGuncat\fP is available at https://fbb\-git\&.gitlab\&.io/guncat/ .PP .SH "ORGANIZATION" Center for Information Technology, University of Groningen\&. .PP .SH "AUTHOR" Frank B\&. Brokken (\fBf\&.b\&.brokken@rug\&.nl\fP)\&.