#
# Author: Michael Rash (mbr@cipherdyne.com)
#
-# Version: 1.9.3
+# Version: 1.9.5
#
-# Copyright (C) 2002-2008 Michael Rash (mbr@cipherdyne.org)
+# Copyright (C) 2002-2009 Michael Rash (mbr@cipherdyne.org)
#
# License: GNU General Public License version 2 (GPLv2)
#
#
###########################################################################
#
-# $Id: gpgdir 328 2008-11-05 05:04:20Z mbr $
+# $Id: gpgdir 341 2009-08-26 02:43:51Z mbr $
#
use File::Find;
use strict;
### set the current gpgdir version and file revision numbers
-my $version = '1.9.3';
-my $revision_svn = '$Revision: 328 $';
+my $version = '1.9.5';
+my $revision_svn = '$Revision: 341 $';
my $rev_num = '1';
($rev_num) = $revision_svn =~ m|\$Rev.*:\s+(\S+)|;
$cmd .= ' -f -s ';
}
}
- $cmd .= $file;
+ $cmd .= qq|"$file"|;
if ($verbose) {
print " Executing: $cmd\n";
}
$decrypt_filename = $1;
} elsif ($filename =~ /^(.+)\.asc$/) {
$decrypt_filename = $1;
+ } elsif ($filename =~ /^(.+)\.pgp$/) {
+ $decrypt_filename = $1;
}
if ($obfuscate_mode) {
sub check_file_criteria() {
my $file = shift;
### skip all links, zero size files, all hidden
- ### files (includes .gnupg files), etc.
+ ### files (includes the .gnupg directory), etc.
return if -d $file;
+
+ unless ($force_mode) {
+ if ($file =~ m|/\.|) {
+ print "[-] Skipping file: $file\n"
+ if $verbose and not $quiet;
+ return;
+ }
+ }
+
if (-e $file and not -l $file and -s $file != 0
- and $file !~ m|/\.|) {
+ and $file !~ m|\.gpgdir\.pid| and $file !~ m|\.gnupg|) {
if ($encrypt_mode or $signing_mode) {
- if ($file =~ m|\.gpg| or $file =~ m|\.asc|) {
+ if ($file =~ m|\.gpg| or $file =~ m|\.asc| or $file =~ m|\.pgp|) {
print "[-] Skipping encrypted/signed file: $file\n" unless $quiet;
return;
}
return;
}
} else {
- unless ($file =~ m|\.gpg| or $file =~ m|\.asc|) {
+ unless ($file =~ m|\.gpg| or $file =~ m|\.asc|
+ or $file =~ m|\.pgp|) {
print "[-] Skipping unencrypted file: $file\n" unless $quiet;
return;
}