X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/ec599f57d8843b2e34270c2083db71e99d76d952..3e6039189ef4130641633e0c8ea6cf2c75e6472f:/gpgstats-0.0.2/gpgprecolons diff --git a/gpgstats-0.0.2/gpgprecolons b/gpgstats-0.0.2/gpgprecolons deleted file mode 100755 index 94ba88a..0000000 --- a/gpgstats-0.0.2/gpgprecolons +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/perl -Tw -# Written by Jonathan McDowell -# Dedicated to linguists called Simon everywhere. -# -# An attempt at parsing the output of gpg -v --with-colons --list-keys -# Not completed yet. Will replace gpgpre and allow info on keysize/type. - -use strict; - -my ($curline, $rsa, $dsa, $elg, $elgeo); - -$rsa=$dsa=$elg=$elgeo=0; - -while ($curline = <>) { - chomp $curline; - - if ($curline =~ /^pub:.*:\d*:(\d*):([0-9a-fA-F]*):.*:.*:.*:.*:(.*):/) { - if ($1 == 1) { - $rsa++; - } elsif ($1 == 16) { - $elgeo++; - } elsif ($1 == 17) { - $dsa++; - } elsif ($1 == 20) { - $elg++; - } -# print "P$2\n"; -# print "N$3\n"; - } elsif ($curline =~ /^sig:.*:\d*:(\d*):([0-9a-fA-F]*):.*:.*:.*:.*:.*/) { -# print "S$2\n"; - } elsif ($curline =~ /^uid:/) { - # Extra uid. Ignore. - } elsif ($curline =~ /^sub:/) { - # Subkey. Ignore. - } elsif ($curline =~ /^rev:/) { - # Unsure. Ignore. - } else { - print "$curline\n"; - } -} - -print "RSA keys: $rsa, DSA keys: $dsa, ELG encrypt-only: $elgeo, ELG: $elg\n";