🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #39373

new postpgp.pl

#39373
From: Ren� Scholz
Date: Fri, 06 Mar 1998 00:00
94 lines
3117 bytes
-----BEGIN PGP SIGNED MESSAGE-----

hi,

I got my hands of the postpgp script and simplified it a bit.
Here is it (used on this article too).
Am I right, that the sed-call is absolute unnecessary because of
s/^\./_./  ? Don't know why it was there in the previous diff.

I you wish, I can also eleminate the cat-call, but that would make the code
a bit longer.

Comments wanted:




#!/usr/local/bin/perl
# [postpgp.pl] v. 2.0
#
# written by jason steiner, jsteiner@anwsun.phya.utoledo.edu, Jan 1993
#
# if you use or make improvements to this program i would appreciate
# copies of your modifications & your PGP public key.
#
# [06.03.1998] modified by Ren� Scholz <mrz@informatik.uni-jena.de>

$HANDLE_POINTS=0;       # if 1: change . to _.  (for inews)

($visual=$ENV{'EDITOR'}) || ($visual="/usr/local/bin/jed");
$name=$ARGV[$#ARGV];    # name of edited file in /tmp (or so)

system($visual,@ARGV);  # create posting with editor

print "Sign this message? [yN]: "; chomp($_=<STDIN>);
if(lc($_) eq "y")
{
  push(@opts, '-st', '+clearsig=on');
  &sign_message();
}



sub sign_message
{
  if(@opts)
  {
    open(INPUT,$name);
    open(HEAD,">$name.head");
    open(BODY,">$name.body");
    while (<INPUT>)
    {
      if (1 .. /^$/) { print HEAD; }
      else
      {
	s/^\./_./  if($HANDLE_POINTS);
	print BODY;
      }
    }
    close(HEAD);
    close(BODY);
    rename "$name.body2", "$name.body";
    system('pgp', '-a', @opts, "$name.body");
    system "cat $name.head $name.body.asc > $name";
    unlink("$name.head", "$name.body", "$name.body.asc");
  }
}





ren�
- -- 
"Wer die Freiheit aufgibt, um Sicherheit zu gewinnen,
 der wird am Ende beides verlieren"             (Benjamin Franklin)
==> Voland @IRC <==  2048/0xF11D6871  2A8D 3F92 4EB8 E55C  3605 D571 38C8 E2B8
mrz@informatik.uni-jena.de            http://www2.informatik.uni-jena.de/~mrz/

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3in
Charset: latin1

iQEVAwUBNQB27scWjdvxHWhxAQGamQf/XUrqXxHblWDLx392+76KHUFJYnMauYLe
N/J8TmBOKeYsKjUNTIMEaWmrtA0//aWkaB7SZP7rYWYJ9KKzZlwNtgHepCiUeS3g
Qps/W/A0Pfg4/JcDGObXOP034QXQ/G6dEYAbyNxAc85TS0f7bP9/z/+BvaGKxCKR
nD2HlCpFDLAmaAl1HMnXgJB9lNjHJu34DRJ5VIDvQ3+Q3JZxBzYgs5GKWGfg1fVf
BmF6hDqI5YEbjLM13QyFQvIxzy4FC/7q97Y8ZrYwnVXssc2gzrhy/wcrCdFyC6Bo
fnrAoB3NHjxCUXldY7x6XRwBz6VXEh843oG5vwKWHQqqLokvfa7xSQ==
=7sf7
-----END PGP SIGNATURE-----

Technical Details
Message-ID: <6dpssk$gkd$4@fsuj19.rz.uni-jena.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <6dpssk$gkd$4@fsuj19.rz.uni-jena.de>
Subject: new postpgp.pl
Date: Fri, 06 Mar 1998 00:00:00 +0000
From: mrz@isun32.inf.uni-jena.de (Ren� Scholz)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 331537842
Content-Transfer-Encoding: 8bit
Mime-Version: 1.0
Reply-To: mrz@informatik.uni-jena.de
Content-Type: text/plain; charset=iso-8859-1
Organization: Lehrstuhl fuer Rechnerarchitektur und -kommunikation, FSU Jena
Newsgroups: news.software.readers