🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #205216

[slrn] NNTP-Posting-Host whois lookup macro

#205216
From: Troy Piggins
Date: Wed, 05 Sep 2007 01:10
39 lines
2372 bytes
Hi guys,

Just threw together a quick macro[1] for slrn that extracts the
NNTP-Posting-Host header's IP address or hostname, runs it
through whois, and displays the output all within slrn.

I find sometimes I do whois lookups to distinguish legit vs
imposter posts, and decided I do it enough to make writing a
small macro to make life easier.  It's not bad.

If you try it and can think of any improvements, let me know.

Just save everything between the verbatim marks below to a file.  I
called it nntp-postinghost.sl.  Then add the line:

interpret nntp-postinghost.sl

to your .slrnrc.  The definekey statement binds the macro to
[ESC]-H, but you can change that to whatever you want.

Hope that all makes sense.

[1]
#v+
define whois_postinghost () {

  variable postinghost=extract_displayed_article_header("NNTP-Posting-Host");
  () = system ( "whois "+postinghost+" | less");

 }

definekey ( "whois_postinghost", "\eH", "article");
#v-

-- 
Troy Piggins | http://piggo.com/~troy                             
                                            ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Technical Details
Message-ID: <20070905110242@usenet.piggo.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <20070905110242@usenet.piggo.com>
Subject: [slrn] NNTP-Posting-Host whois lookup macro
Date: Wed, 05 Sep 2007 11:10:57 +1000
From: Troy Piggins <usenet-0709@piggo.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!not-for-mail
Newsgroups: news.software.readers
Reply-To: usenet-0709@piggo.com
X-NNTP-Proxy: Leafnode-2
 (http://www-dt.e-technik.uni-dortmund.de/~ma/leafnode/beta/)
User-Agent: slrn/0.9.8.1pl2.1/rt (Linux)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 39
NNTP-Posting-Host: 124.171.229.82
X-Trace: 1188954662 per-qv1-newsreader-01.iinet.net.au 28508 124.171.229.82