Article View: news.software.readers
Article #205238Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
From: Peter J Ross
Date: Wed, 05 Sep 2007 15:48
Date: Wed, 05 Sep 2007 15:48
48 lines
3007 bytes
3007 bytes
In news.software.readers on Wed, 05 Sep 2007 21:37:37 +1000, Troy
Piggins <usenet-0709@piggo.com> wrote:
> * FACE is quoted & my replies are inline below :
>> On Wed, 05 Sep 2007 15:12:45 +1000, in news.software.readers Troy Piggins
>> <usenet-0709@piggo.com>, wrote:
>>
>>>If anyone knows of other headers that may contain useful
>>>IP/hostname information, let me know and I can add it.
>>
>> I believe that X-Trace does, but good luck in reading it. (If anyone knows
>> how that line is encrypted, and how to decrypt it, please share.)
>
> Thanks for that. I had a quick browse for it, but it seems to be
> newsreader specific, so doubt it can be easily added to my macro.
X-Trace is (or at least should be) added by the server, not the
newsreader. It *may* contain an unencrypted IP address.
Another header that may contain an IP address is Injection-Info.
In both cases you'd have to extract anything that seemed to be an IP
address from the header.
S-Lang regex:
\<\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\>
PCRE regex:
\b(\d{1,3}\.){3}\d{1,3}\b
POSIX.2 regex (for "grep -e" etc.):
\b\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\b
(This is the only one I've tested.)
LISP regex:
probably a mixture of the above with about twenty extra
backslashes ;-)
In fact, you could parse all headers for IP addresses, but you'd have
to exclude at least Path: and Message-ID, which may contain IP
addresses that identify a news server, not a poster.
Anyway, your macro looks useful enough already, without a huge amount
of elaboration being needed. Thanks.
--
PJR :-)
Technical Details
Message-ID:
<slrnfdtjus.3bm.pjr@pjr.gotdns.org>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!border2.nntp.dca.giganews.com!nntp.giganews.com!news-out.octanews.net!indigo.octanews.net!authen.yellow.readfreenews.net.POSTED!not-for-mailReferences:
<20070905110242@usenet.piggo.com> <slrnfds2dc.vb2.no.spam@thurston.blinkynet.net> <slrnfds2sp.vb2.no.spam@thurston.blinkynet.net> <20070905120737@usenet.piggo.com> <slrnfds750.178.no.spam@thurston.blinkynet.net> <20070905150540@usenet.piggo.com> <6d2td3loe2armjvd255ic60kqm5sjs7dp9@4ax.com> <20070905213330@usenet.piggo.com>Show Full Headers
Complete Article Headers
Message-ID: <slrnfdtjus.3bm.pjr@pjr.gotdns.org> Subject: Re: Update: [slrn] NNTP-Posting-Host whois lookup macro Date: Wed, 05 Sep 2007 15:48:44 +0000 From: Peter J Ross <pjr@example.invalid> References: <20070905110242@usenet.piggo.com> <slrnfds2dc.vb2.no.spam@thurston.blinkynet.net> <slrnfds2sp.vb2.no.spam@thurston.blinkynet.net> <20070905120737@usenet.piggo.com> <slrnfds750.178.no.spam@thurston.blinkynet.net> <20070905150540@usenet.piggo.com> <6d2td3loe2armjvd255ic60kqm5sjs7dp9@4ax.com> <20070905213330@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!border2.nntp.dca.giganews.com!nntp.giganews.com!news-out.octanews.net!indigo.octanews.net!authen.yellow.readfreenews.net.POSTED!not-for-mail Newsgroups: news.software.readers Organization: none Reply-To: pjr.spam@gmail.com User-Agent: slrn/0.9.8.1pl2.1 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 48 NNTP-Posting-Date: 05 Sep 2007 10:48:44 CDT X-Trace: DXC=b=0i?S2kZ>5MNm1ch1FnT2]AGWjF5PjP9465Ue@WB_5?=iD6ZLH2gX626Z<EbT:a\5lV3mi\haFg8[\J[m5T^075`o6Ed?THQk? X-Original-Bytes: 2702