🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: ak.test
Article #442

filter_nnrpd.pl autistici noauth

#442
From: Gab
Date: Wed, 10 Jun 2009 23:47
88 lines
3797 bytes
test:

> use strict;
> use Digest::SHA1;
> 
> our (%hdr, $modify_headers);
> my $lasttime = 0;
> my $serial = 0;
> 
> 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'};
> 
>     # Hash the NNTP-Posting-Date header
>     my $cctx = Digest::SHA1->new;
>     $cctx->add($hdr{'NNTP-Posting-Date'});
>     $cctx->add("Would you like some salt with that?");
>     $hdr{'NNTP-Posting-Date'} = $cctx->hexdigest;
> 
>     my $rval = "";
> 
> 
>         if ($hdr{'Path'} =~ /unwanted/) {
>          $rval = "You are not allowed to post";
>          }
>       elsif ($hdr{'Message-ID'} =~ /unwanted/) {
>       $rval = "Non puoi farlo";
>       } 
>       elsif ($hdr{'Newsgroups'} =~ /./) {
> 
> #       # Disallow crossposting to avoid unforeseen abuses
> #       if ($hdr{"Newsgroups"} ne "test") {
> #           $rval = "No crossposting between test and other groups";
> #       }
> #       else {
>         
>          $modify_headers = 1;
>            $hdr{'X-Trace'} = "";
>          $hdr{'X-Newsreader'} = "Null Reader";
>            $hdr{'X-MSMail-Priority'} = "";
>            $hdr{'X-Priority'} = "";
>            $hdr{'X-Mailer'} = "None Mailer";
>          $hdr{'X-MimeOLE'} = "";
>          $hdr{'Sender'} = "";
>          $hdr{'X-Sender'} = "";
>          $rval = "";
>       } elsif ($hdr{"Newsgroups"} =~ /^anon/) {
>            $modify_headers = 1;
>            # Give everyone the same From: header.
> 
>            # Hide the originating host.
>            $hdr{'X-Trace'} = "";
>            $hdr{'Organization'} = "";
>            $hdr{'User-Agent'} = "anon v.666";
>            $hdr{'Reply-To'} = "";
>            $hdr{'X-Newsreader'} = "Null Reader";
>            $hdr{'X-MSMail-Priority'} = "";
>            $hdr{'X-Priority'} = "";
>            $hdr{'X-Mailer'} = "None Mailer";
>            $hdr{'X-MimeOLE'} = "";
> 
> 
>            # Clobber the Message-ID
>            my $thistime = time();
>            if ($thistime != $lasttime) {
>                $serial = 1;
>            }
>            else {
>                $serial++;
>            }
>            $lasttime = $thistime;
>            $hdr{'Message-ID'} = "<$thistime.$$.$serial\@localhost>";
>       } $rval;
> }
> 

Gli header X-Mailer e X-Newsreader non possono rimanere vuoti e ho aggiunto
sha1 come hash , sostituendo md5 , mentre ho aggiunto la crittografia su
NNTP-Post-Header , che secondo me va bene se nnon si sappia quando ...

Gab
-- 
8D7912A0 B26A 9F72 E8A0 0FEB 4607  A2E6 3262 11A9 8D79 12A0
Noauth Usenet News & mail2news  http://www.gabrix.ath.cx/ 
Technical Details
Message-ID: <h0pgm8$ahh$1@news.gabrix.ath.cx>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.musoftware.de!wum.musoftware.de!news.mixmin.net!news.gabrix.ath.cx!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 99ea01a4ec,5d10e999df11f4b7,start
X-Google-Attributes: gid99ea01a4ec,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.musoftware.de!wum.musoftware.de!news.mixmin.net!news.gabrix.ath.cx!not-for-mail
From: Gab <admin@gabrix.ath.cx>
Newsgroups: ak.test
Subject: filter_nnrpd.pl autistici noauth
Date: Thu, 11 Jun 2009 01:47:20 +0200
Organization: Noauth - Free - Services
Lines: 88
Message-ID: <h0pgm8$ahh$1@news.gabrix.ath.cx>
Reply-To: admin@gabrix.ath.cx
NNTP-Posting-Host: 9e7d46f6c2835ccf28c247d2645b7d533645562e
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
X-Complaints-To: usenet@gabrix.ath.cx
NNTP-Posting-Date: 21708281c8ad5903664fd0d8f4a1a1f0da58decd
X-Mailer: None Mailer
X-Newsreader: Null Reader
User-Agent: KNode/0.10.9