Article View: news.software.nntp
Article #34113Re: inews-like program for non-local server?
From: Fluffy
Date: Mon, 28 Dec 1998 00:00
Date: Mon, 28 Dec 1998 00:00
67 lines
2878 bytes
2878 bytes
Fluffy <meowing@banet.net> wrote:
> Here's toy-inews which can do it. Needs Perl5 and the libnet bundle.
> Careful with the -D option. Unlike the INN inews, it does actually
> attempt to post.
Hmm. The authinfo stuff as-is won't be very nice if you're on a public
machine where people can see your command lines in ps. Here's some
stuff to make it use a file for that.
*** toy-inews.orig Sun Dec 27 21:11:54 1998
--- toy-inews Sun Dec 27 21:24:29 1998
***************
*** 8,12 ****
# toy-inews -snews.example.com .article # posts to news.foo.com
- # toy-inews -snews.example.com:username:password .article # with authinfo
# toy-inews -D .article # display the transaction for debugging
# toy-inews -S .article # append $HOME/.signature to article
--- 8,19 ----
# toy-inews -snews.example.com .article # posts to news.foo.com
# toy-inews -D .article # display the transaction for debugging
# toy-inews -S .article # append $HOME/.signature to article
+ #
+ # If you need authinfo, create a file $HOME/.toy-passwd and
+ # put this kind of information in it:
+ #
+ # foo.example.com:user:passwd
+ # news.example.net:username:password
+ #
+ # (just omit the ones that don't need authinfo.)
***************
*** 25,27 ****
my ($nntp, $infile, @article, $msgid, $idhdr, $result, $mod,
! $username, $password,
);
--- 32,34 ----
my ($nntp, $infile, @article, $msgid, $idhdr, $result, $mod,
! $username, $password, $foo,
);
***************
*** 37,40 ****
s/^-s//;
! ($nntpserver, $username, $password) = split /:/, $_;
}
}
--- 44,58 ----
s/^-s//;
! $nntpserver = $_;
}
+ }
+
+ if (open(TOYPASSWD, "$ENV{HOME}/.toy-passwd")) {
+ while (<TOYPASSWD>) {
+ if (/^$nntpserver:/) {
+ chomp;
+ ($foo, $username, $password) = split /:/;
+ last;
+ }
+ }
+ close(TOYPASSWD);
}
--
"FEAST!"
--Alice
Technical Details
Message-ID:
<766qcp$kvu@meow.invalid>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<766g26$f6h$1@tepe.tezcat.com> <766mnm$kml@meow.invalid>Show Full Headers
Complete Article Headers
Message-ID: <766qcp$kvu@meow.invalid> Subject: Re: inews-like program for non-local server? Date: Mon, 28 Dec 1998 00:00:00 +0000 From: meowing@banet.net (Fluffy) References: <766g26$f6h$1@tepe.tezcat.com> <766mnm$kml@meow.invalid> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 426314725 Mail-Copies-To: never X-Notice: should be reported to postmaster@ibm.net X-Complaints-To: postmaster@ibm.net X-Trace: 28 Dec 1998 02:28:47 GMT, 129.37.99.162 Organization: Alternative Pinwheel Iceland The Manitoba X-URL: http://members.tripod.com/~gerglery/ X-P-Meow: Meow Cancel-Lock: sha1:oUT83i3kT1Kn8NnnTdJgAUUJ4PE= Newsgroups: news.software.nntp