home *** CD-ROM | disk | FTP | other *** search
/ Der Mediaplex Sampler - Die 6 von Plex / 6_v_plex.zip / 6_v_plex / DISK5 / DOS_10 / PGP23ASR.ZIP / PGPCTB23.ZIP / MAIL_TIN.ZIP / MAILPGP next >
Text File  |  1993-03-07  |  1KB  |  40 lines

  1. #!/usr/local/perl
  2.  
  3. # written by jason steiner, jsteiner@anwsun.phya.utoledo.edu, Jan 1993
  4. #
  5. # if you use or make improvements to this program i would appreciate
  6. # copies of your modifications & your PGP public key.
  7.  
  8. ($visual = $ENV{'VISUAL'}) || ($visual = '/usr/ucb/vi');
  9. system($visual,@ARGV);
  10. while (!$q) {
  11.         print "Sign this message? [Y]: ";
  12.         $q=<STDIN>;
  13.         chop $q;
  14.         if (($q eq 'Y') || ($q eq 'y') || ($q eq '')) {
  15.                 push(@opts,'-st','+clearsig=on');
  16.                 $q="y";
  17.                 }
  18.         elsif (($q ne 'N') && ($q ne 'n')) {
  19.                 $q='';
  20.         }
  21. }
  22. $q='';
  23. while (!$q) {
  24.         print "Encrypt this message? [Y]: ";
  25.         $q=<STDIN>;
  26.         chop $q;
  27.         if (($q eq 'Y') || ($q eq 'y') || ($q eq '')) {
  28.                 push(@opts,'-e');
  29.                 $q="y";
  30.                 }
  31.         elsif (($q ne 'N') && ($q ne 'n')) {
  32.                 $q='';
  33.         }
  34. }
  35. if (@opts) {
  36.         $name=$ARGV[$#ARGV];
  37.         system('pgp','-a',@opts,$name);
  38.         system "mv ${name}.asc $name";
  39. }
  40.