🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #146762

Re: [Xnews] Best way to send GnuPG signed messages with Xnews?

#146762
From: Tim Weaver
Date: Tue, 20 Apr 2004 08:25
43 lines
2958 bytes
Murray Peterson wrote:
> Guy wrote: 
> 
>> The below will strip PGP signatures in a reply:
>> SigDashRegex=^\-\-\s?$|^(\-{5}\s?)BEGIN\b\s\PGP\b\s\SIGNATURE\b\1$|
>> ^\-\ s\-\-\s?$|^\-\-\-$ 
>> 
>> Perhaps someone could make it more efficient?
>>  hint Murray ;)
> 
>> -----BEGIN PGP SIGNATURE-----
> 
> I am not sure what variations these signatures are allowed, but if
> they  match yours, then you can simplify the regexp a lot.  Several
> things to  note:
> 
> 1. "-" is not a special character, so no need to escape it
> 2. If matching 5 or more dashes, then no need to remember the sub-
> expression unless this is an important feature of recognizing a PGP
> sig. 3. Matching is case insensitive be default
> 4. No need to use the word boundary anchors
> 5. Are any spaces allowed between the dashes and the words?
> 6. Is only a single space allowed between the words?
> 7. Probably no need to anchor the end of the sig to end of line
> 
> Assuming that the answer to #5 is "no", and to #6 is "yes", then
> here is a simple one (PGP part only):
> 
>          ^-{5}begin pgp signature-{5}
> 
> If we allow extra spaces in a few places, then you can use this:
> 
>          ^-{5}\s*begin\s+pgp\s+signature\s*-{5}
> 
> If exactly 5 dashes are required (no more, no less), then you can
> leave  out the repeat counters:
> 
>          ^-----begin pgp signature-----

Is there a way to strip out "-----BEGIN PGP SIGNED MESSAGE-----" on
the first line?  I'm thinking no.
-- 
Tim Weaver
Technical Details
Message-ID: <Xns94D12D1417968tmw1962666hotmailcom@news.fu-berlin.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.20140922.mbox.gz!number1.nntp.ash.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!fu-berlin.de!uni-berlin.de!pcp441466pcs.sprngf01.ga.comcast.NET!not-for-mail
References: <Xns94CFA40DF6B3Fsimeramov@161.53.2.66> <253971082303882-387305551ab4@127.0.0.1> <Xns94D08A5A971Csimeramov@161.53.2.66> <314421082436180-519993551ab4@127.0.0.1> <Xns94D0EDF64458Afarkle@24.71.223.159>

Show Full Headers
Complete Article Headers
Message-ID: <Xns94D12D1417968tmw1962666hotmailcom@news.fu-berlin.de>
Subject: Re: [Xnews] Best way to send GnuPG signed messages with Xnews?
Date: Tue, 20 Apr 2004 08:25:37 +0000
From: Tim Weaver <tmw1962666.invalid@hotmail.com>
References: <Xns94CFA40DF6B3Fsimeramov@161.53.2.66> <253971082303882-387305551ab4@127.0.0.1> <Xns94D08A5A971Csimeramov@161.53.2.66> <314421082436180-519993551ab4@127.0.0.1> <Xns94D0EDF64458Afarkle@24.71.223.159>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.ash.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!fu-berlin.de!uni-berlin.de!pcp441466pcs.sprngf01.ga.comcast.NET!not-for-mail
Newsgroups: news.software.readers
Organization: The Cheese Club
Lines: 43
NNTP-Posting-Host: pcp441466pcs.sprngf01.ga.comcast.net (68.51.187.206)
X-Trace: news.uni-berlin.de 1082449537 7578465 I 68.51.187.206 ([104116])
User-Agent: Xnews/06.02.16
X-No-Archive: yes
X-Face: #&_f8kT`2NjKe8IdJY="[JpP;
 ]jwfo'lM._DS`:eFf/L(69.8:/fEyX}w~X%dcs(-54Ky~0#'gQ{lx8CgGig)VeI{*yirO;
 gje6]&(yi|FAAy2}IaU>drSvl