🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #81325

Can someone write a nnrpd perl filter ?

#81325
From: Anonymous
Date: Mon, 08 Jun 2009 04:43
43 lines
2640 bytes
Hi!
I have tried many filter_nnrpd.pl , but none of them has all the features i need.
I'm a person concerned about privacy for my users i sustain free speech and i want to make me sure 
for their non-persecution .
I would like to cover by md5 (sha1) the NNTP-Posting-Host,NNTP-Posting-Date and X-Trace headers and also some 
rbl checks will be appreciated .
This is a sample i wrote , maybe we can start from here:

use strict;
use Digest;
use Digest::MD5;
use Digest::SHA1;
use Net::DNS;
our (%hdr, $modify_headers);

sub filter_post {

    # Hash the NNTP-Posting-Host header
    my $ctx = Digest::SHA1->new;
    $ctx->add($hdr{'NNTP-Posting-Host'});
    $ctx->add("Would you like some salt with that?");
    $hdr{'NNTP-Posting-Host'} = $ctx->hexdigest;
#    undef $hdr{'X-Trace'};
    # Date
    my $atx = Digest::SHA1->new;
    $atx->add($hdr{'NNTP-Posting-Date'});
    $atx->add("Would you like some salt with that?");
    $hdr{'NNTP-Posting-Date'} = $atx->hexdigest;
#    undef $hdr{'X-Trace'};
    #
    my $btx = Digest::SHA1->new;
    $btx->add($hdr{'X-Trace'});
    $btx->add("Would you like some salt with that?");
    $hdr{'X-Trace'} = $btx->hexdigest;
    #
    $modify_headers = 1;
    return '';
}

Compilation for the above filter is OK,but i don't know yet how to
go on for the rbl checks. 
I have just started up with perl and basically i need some help for this.
Thank you. 
Technical Details
Message-ID: <a8ffa297001db143e2eae760ca3c05cd@mixmaster.nymu.eu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!news.stack.nl!news.gabrix.ath.cx!m2n.gabrix.ath.cx

Show Full Headers
Complete Article Headers
Message-ID: <a8ffa297001db143e2eae760ca3c05cd@mixmaster.nymu.eu>
Subject: Can someone write a nnrpd perl filter ?
Date: Mon, 08 Jun 2009 04:43:28 +0000
From: Anonymous <Use-Author-Supplied-Address-Header@[127.1]>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!news.stack.nl!news.gabrix.ath.cx!m2n.gabrix.ath.cx
Comments: This message did not originate from the Sender address above.
 It was remailed automatically by anonymizing remailer software.
 Please report problems or inappropriate use to the
 remailer administrator at <admin@nymu.eu>.
Reply-To: none@null.no
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Newsgroups: news.software.nntp
Author-Supplied-Address: nobody<AT>nymu<DOT>eu
X-Abuse-Contact: mail2news-abuse@m2n.gabrix.ath.cx
Lines: 44