🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Anonymous Mon, 08 Jun 2009 04:43
Can someone write a nnrpd perl filter ?
#81325
Author: 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. 
Re: Can someone write a nnrpd perl filter ?
#81327
Author: Etian
Date: Mon, 08 Jun 2009 10:25
61 lines
3417 bytes
Anonymous wrote:
> 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. 
While you are developing it, you need it to work by itself.  So in the 
main body, you store some data to the parts of %hdr that you want to 
test, and you call the functions to test them, and run it from the 
command line.  After its working by itself, then you strip that stuff 
from the body.

A big concern with INN, is that if the filter dies, then the x-trace and 
host are exposed to the world.  Since this seems to be a concern shared 
by most of us, we could hope that in a future release the maintainers 
might allow these to be set in the authentication script rather than 
covering them up in the filter.

I'm curious though--why are you hiding the date?


Etian
sonic-news
Re: Can someone write a nnrpd perl filter ?
#81328
Author: gabrix
Date: Mon, 08 Jun 2009 11:24
21 lines
1653 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Etian wrote:


> I'm curious though--why are you hiding the date?

It's a proof of 'crime' offcourse ...

- -- 
sec   1024D/80231A90 2008-07-01
Key fingerprint = 54AC C632 B35E FB9B 6D9F  108D DBE6 5425 8023 1A90

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkos9OcACgkQ2+ZUJYAjGpCiigCggy2W2Zz08LKxW7S/Er6jg4F4
SwcAn2uDBczyUHntgucMHsYzGlBgzd0P
=gjVt
-----END PGP SIGNATURE-----
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads