🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #66038

Re: hamster?

#66038
From: Graham Drabble
Date: Wed, 09 Jul 2003 13:16
65 lines
2918 bytes
On 09 Jul 2003 Heiko Studt <UsenetBecky@goldpool.org> wrote in
news:begqan.3c0.1@privat.goldpool.org: 

> Ehm...
> You don't need to, you can also try to programm a client using
> MODE CANCEL. ;-> (AFAIK there is no one yet, sorry)

I've had the following lieing around for a while, it's a bit messy but
it works. It's written in perl.

use strict;
use warnings;
use diagnostics;
use Net::Telnet;

open(IN, 'C:/Usenet/message-ids.txt') || die "Can't open message-ids.txt:  $!";
open(OUT, '>C:/Usenet/message-ids-processed.txt') || die "Can't open message-ids-processed.txt:  $!";

my $host = new Net::Telnet (Host => 'localhost', Port => 119);

$host->getline;
$host->print('authinfo user <INSERT USER NAME>');
response(381,'authinfo user');

$host->print('authinfo pass <INSERT PASSWORD>');
response(281,'authinfo pass');

$host->print('mode cancel');
response(284,'mode cancel');

while(<IN>){
	chomp;
	$host->print($_);
	my $response = $host->getline;
	if ($response =~ /^289/){
		print OUT "$_ deleted\n";
	}
	else
	{
		print OUT "Deleting $_ failed.  $response\n";
	}
}
	
$host->print('.');
response(201,'terminating mode cancel with \'.\'');

$host->print('quit');



sub response{
	my($code_wanted,$job) = @_;
	my $response = $host->getline;
	unless ($response =~/^$code_wanted/){
		$host->print('quit');
		die "Received $response for $job";
	}
}


-- 
Graham Drabble
If you're interested in what goes on in other groups or want to find 
an interesting group to read then check news.groups.reviews for what 
others have to say or contribute a review for others to read.
Technical Details
Message-ID: <Xns93B3913147D87grahamdrabblelineone@ID-77355.user.dfncis.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.news2me.com!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!news-out.visi.com!petbe.visi.com!green.readfreenews.net!news.readfreenews.net!authen.puce.readfreenews.net.POSTED!not-for-mail
References: <vgjrv3a7e1ar16@corp.supernews.com> <33467.873200@archiver.winews.net> <vgmc8fjf3lcna3@corp.supernews.com> <begqan.3c0.1@privat.goldpool.org>

Show Full Headers
Complete Article Headers
Message-ID: <Xns93B3913147D87grahamdrabblelineone@ID-77355.user.dfncis.de>
Subject: Re: hamster?
Date: Wed, 09 Jul 2003 14:16:22 +0100
From: Graham Drabble <graham.drabble@lineone.net>
References: <vgjrv3a7e1ar16@corp.supernews.com> <33467.873200@archiver.winews.net> <vgmc8fjf3lcna3@corp.supernews.com> <begqan.3c0.1@privat.goldpool.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.news2me.com!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!news-out.visi.com!petbe.visi.com!green.readfreenews.net!news.readfreenews.net!authen.puce.readfreenews.net.POSTED!not-for-mail
Newsgroups: news.software.nntp
Organization: Home
User-Agent: Xnews/5.04.25 Hamster/2.0.2.1
Lines: 65
NNTP-Posting-Date: 09 Jul 2003 08:19:12 CDT
NNTP-Posting-Host: c1f298e1.authen.puce.readfreenews.net
X-Trace: DXC=OZDj<=E<<Q?_LENH2THoA70TEf1TMUA>8DdA=iLI<Fm;
 =A0Cg\BUL`<GE<7oB?[f70m[<]RH>b]C8Ke3e0j2b; e8aI@=n`jD<B>
X-Complaints-To: abuse@readfreenews.com