[prev in list] [next in list] [prev in thread] [next in thread]
List: gnupg-devel
Subject: Re: Differentiating GPG data from random data
From: Bernd Eckenfels <lists-gnupgdev () lina ! inka ! de>
Date: 2008-11-28 3:42:40
Message-ID: 20081128034240.GB3535 () lina ! inka ! de
[Download RAW message or body]
On Tue, Nov 25, 2008 at 09:09:09AM -0500, Ted wrote:
> Thank you for the information. It confirms what I thought after
> reading the RFCs. It would be better for me to accidentally include
> some GPG files rather than accidentally exclude files I'm searching
> for. I can manually look at the files and use GnuPG to easily tell the
> GPG ones from the non-GPG ones.
you could run
gpg --dry-run --list-packets --batch --home empty/ --status-fd 1 <file>
and check "NODATA" on stdout. Unfortunatelly a malformed PGP packet will
have the same return code (2) than a encrypted message (at least in my 1.4.1
which i tried the NO DATA and NO_SECKEY both cause exit code 2).
This will detect lots of (valid) OpenPGP files. Not sure if there are saner
options to actually make gpg not do anything.
Gruss
Bernd
--
(OO) -- Bernd_Eckenfels@Mörscher_Strasse_8.76185Karlsruhe.de --
( .. ) ecki@{inka.de,linux.de,debian.org} http://www.eckes.org/
o--o 1024D/E383CD7E eckes@IRCNet v:+497211603874 f:+49721151516129
(O____O) When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl!
_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic