πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
16 messages
16 total messages Started by Anonymous Wed, 12 Sep 2012 16:46
CLI tools that can handle snews:// URLs
#251531
Author: Anonymous
Date: Wed, 12 Sep 2012 16:46
13 lines
1281 bytes
Is lynx the only commandline tool that can dump the contents of a
newsgroup post?  

If I want to dump a newsgroup article, I can do:

  lynx --dump snews://news.gmane.org/gmane.comp.web.lynx.devel

(very slick!).  Problem is, when it comes to dumping an article, only
basic headers are shown and it's hard-coded to do that.  I need a way
to access obscure headers from a script (hence the CLI need).

FYI, cURL, w3m, and wget cannot handle snews:// URLs.
Re: CLI tools that can handle snews:// URLs
#251534
Author: Eli the Bearded
Date: Wed, 12 Sep 2012 18:52
35 lines
2561 bytes
In news.software.readers, Anonymous  <noreply@breaka.net> wrote:
> Is lynx the only commandline tool that can dump the contents of a
> newsgroup post?  

I've seen others, but I'm not sure how widespread they are.

> If I want to dump a newsgroup article, I can do:
> 
>   lynx --dump snews://news.gmane.org/gmane.comp.web.lynx.devel

I tried that and got:

Connecting to NewsHost ...
Looking up news.gmane.org
Making NNTPS connection to news.gmane.org
Alert!: Unable to make secure connection to remote host.

I'm not sure if that's a news.gmane.org problem or an issue with
my installed copy of lynx.

> (very slick!).  Problem is, when it comes to dumping an article, only
> basic headers are shown and it's hard-coded to do that.  I need a way
> to access obscure headers from a script (hence the CLI need).

I bet you'll find "lynx --dump --source" to work for you. I know that
makes the difference between formated and raw output on news: URLs
in lynx.

> FYI, cURL, w3m, and wget cannot handle snews:// URLs.

Do they handle news:// urls? I don't think so.

Elijah
------
LWP does news: URLs and can probably handle snews:
Re: CLI tools that can handle snews:// URLs
#251537
Author: Whiskers
Date: Wed, 12 Sep 2012 21:30
29 lines
2422 bytes
On 2012-09-12, Anonymous <noreply@breaka.net> wrote:
> Is lynx the only commandline tool that can dump the contents of a
> newsgroup post?  
>
> If I want to dump a newsgroup article, I can do:
>
>   lynx --dump snews://news.gmane.org/gmane.comp.web.lynx.devel
>
> (very slick!).  Problem is, when it comes to dumping an article, only
> basic headers are shown and it's hard-coded to do that.  I need a way
> to access obscure headers from a script (hence the CLI need).
>
> FYI, cURL, w3m, and wget cannot handle snews:// URLs.

I'm not sure if it qualifies as a 'commandline tool' for your purposes,
but slrn can save any article you're reading; hit o and accept or edit the
suggested file-name, and all headers and body for that article are saved as
a single file.  (It can save whole threads, too).

Most usenet clients can probably do that.

Use a local caching news-server (eg Leafnode) if you want to examine dozens
or hundreds of articles; it'll give you all the articles in the group in a
single operation, each one as a seperate file with all its headers.

-- 
-- ^^^^^^^^^^
--  Whiskers 
-- ~~~~~~~~~~
Re: CLI tools that can handle snews:// URLs
#251562
Author: Anonymous
Date: Thu, 13 Sep 2012 19:12
12 lines
1422 bytes
>Problem is, when it comes to dumping an article, only basic headers
>are shown and it's hard-coded to do that.

I have the answer.  Using "lynx -source" or "lynx -trace" will get all
the headers.

My next question is how to *post* from the commandline.  Lynx can post
interactively, but I suspect that the -post_data option is only for
http posting.

Any usenet tools that are designed to work from the commandline?
Re: CLI tools that can handle snews:// URLs
#251564
Author: John F. Morse
Date: Thu, 13 Sep 2012 20:21
24 lines
1987 bytes
Anonymous wrote:
>> Problem is, when it comes to dumping an article, only basic headers
>> are shown and it's hard-coded to do that.
>>     
>
> I have the answer.  Using "lynx -source" or "lynx -trace" will get all
> the headers.
>
> My next question is how to *post* from the commandline.  Lynx can post
> interactively, but I suspect that the -post_data option is only for
> http posting.
>
> Any usenet tools that are designed to work from the commandline?
>   


Telnet.


-- 
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?
Re: CLI tools that can handle snews:// URLs
#251566
Author: Eli the Bearded
Date: Thu, 13 Sep 2012 21:12
55 lines
3108 bytes
In news.software.readers, John F. Morse <dont.bother> wrote:
> Anonymous wrote:
>> My next question is how to *post* from the commandline.  Lynx can post
>> interactively, but I suspect that the -post_data option is only for
>> http posting.
>> Any usenet tools that are designed to work from the commandline?
> Telnet.

Hahaha. Telnet works fine for an encrypted channel, but will suck at
an SSL link. Normally you'd use 'inews' for this task, but the trn4,
nn, and inn versions of 'inews' I've looked at today do not do SSL.

You might be able to get openssl to provide the suitable telnet-style
tunnel. 

And...

I just tried it with my local news server, and it worked just fine.
Lines starting with numbers are exact output from the newsserver
in this cut-and-paste transcript:

$ openssl s_client -connect news.panix.com:563
[ lots of openssl output ]
authinfo user USERNAME
381 PASS required
authinfo pass PASSWORD
281 Ok
post
340 Ok, recommended ID <k2thgj$g3g$1@reader1.panix.com>
From: Eli the Bearded <*@eli.users.panix.com>
Newsgroups: panix.test
Subject: openssl s_client -connect news.panix.com:563
Message-ID: <k2thgj$g3g$1@reader1.panix.com>

Test post using:
        openssl s_client -connect news.panix.com:563
and typing my post in.

Elijah
------
whee!
..
240 Article posted <k2thgj$g3g$1@reader1.panix.com>
quit
205 .
closed
$ 

I then checked the test group and saw my post. First time I've
gotten the panix news server to use "localhost" in NNTP-Posting-Host:
header.

Elijah
------
it also used 127.0.0.1 in X-Trace:
Re: CLI tools that can handle snews:// URLs
#251573
Author: John F. Morse
Date: Fri, 14 Sep 2012 02:52
87 lines
3820 bytes
Eli the Bearded wrote:
> In news.software.readers, John F. Morse <dont.bother> wrote:
>   
>> Anonymous wrote:
>>     
>>> My next question is how to *post* from the commandline.  Lynx can post
>>> interactively, but I suspect that the -post_data option is only for
>>> http posting.
>>> Any usenet tools that are designed to work from the commandline?
>>>       
>> Telnet.
>>     
>
> Hahaha. Telnet works fine for an encrypted channel, but will suck at
> an SSL link. Normally you'd use 'inews' for this task, but the trn4,
> nn, and inn versions of 'inews' I've looked at today do not do SSL.
>
> You might be able to get openssl to provide the suitable telnet-style
> tunnel. 
>
> And...
>
> I just tried it with my local news server, and it worked just fine.
> Lines starting with numbers are exact output from the newsserver
> in this cut-and-paste transcript:
>
> $ openssl s_client -connect news.panix.com:563
> [ lots of openssl output ]
> authinfo user USERNAME
> 381 PASS required
> authinfo pass PASSWORD
> 281 Ok
> post
> 340 Ok, recommended ID <k2thgj$g3g$1@reader1.panix.com>
> From: Eli the Bearded <*@eli.users.panix.com>
> Newsgroups: panix.test
> Subject: openssl s_client -connect news.panix.com:563
> Message-ID: <k2thgj$g3g$1@reader1.panix.com>
>
> Test post using:
>         openssl s_client -connect news.panix.com:563
> and typing my post in.
>
> Elijah
> ------
> whee!
> .
> 240 Article posted <k2thgj$g3g$1@reader1.panix.com>
> quit
> 205 .
> closed
> $ 
>
> I then checked the test group and saw my post. First time I've
> gotten the panix news server to use "localhost" in NNTP-Posting-Host:
> header.
>
> Elijah
> ------
> it also used 127.0.0.1 in X-Trace:
>   


Your telnet session looks normal.

Give telnet a try through Stunnel.

I use Stunnel to access my INN server when using any non-TLS/SSL 
newsreaders. It works fine for me.

The /etc/stunnel/stunnel.conf stanza would be something like this:

[nntps]
accept = 119
connect = news.panix.com:563

I don't have trn/trn4 handy, and know nn doesn't support TLS/SSL.

However I do use Stunnel for KNode, nn, Pan, slrn, tin, and telnet when 
I need to get down and dirty. ;-)


-- 
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?
Re: CLI tools that can handle snews:// URLs
#251580
Author: Eli the Bearded
Date: Fri, 14 Sep 2012 19:22
22 lines
2377 bytes
In news.software.readers, John F. Morse <dont.bother> wrote:
> Your telnet session looks normal.
> 
> Give telnet a try through Stunnel.

"telnet" and "stunnel telnet" are not the same thing. The openssl
command I used is essentially an stunnel telnet.

> The /etc/stunnel/stunnel.conf stanza would be something like this:
> 
> [nntps]
> accept = 119
> connect = news.panix.com:563

Using inews over stunnel is probably a good solution for the poster.
The inews from trn4, among others, will read user and password from
a ~/.nntpauth file to login once connected. That would probably be
all the poster needs.

Elijah
------
has never used stunnel, always used the openssl commands
Re: Re: CLI tools that can handle snews:// URLs
#251586
Author: Anonymous
Date: Sat, 15 Sep 2012 06:31
10 lines
1282 bytes
>In news.software.readers, John F. Morse <dont.bother> wrote:
>
>I just tried it with my local news server, and it worked just fine.
>Lines starting with numbers are exact output from the newsserver
>in this cut-and-paste transcript:

Thank you!  That transcript was very helpful.  I like that approach.


Re: CLI tools that can handle snews:// URLs
#251590
Author: John F. Morse
Date: Sat, 15 Sep 2012 20:04
19 lines
2009 bytes
Anonymous wrote:
>> In news.software.readers, John F. Morse <dont.bother> wrote:
>>
>> I just tried it with my local news server, and it worked just fine.
>> Lines starting with numbers are exact output from the newsserver
>> in this cut-and-paste transcript:
>>     
>
> Thank you!  That transcript was very helpful.  I like that approach.
>   


You have fouled up the attribution. That quote is not mine.

-- 
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?
Re: CLI tools that can handle snews:// URLs
#251592
Author: John F. Morse
Date: Sat, 15 Sep 2012 20:45
83 lines
3904 bytes
Eli the Bearded wrote:
> In news.software.readers, John F. Morse <dont.bother> wrote:
>   
>> Your telnet session looks normal.
>>
>> Give telnet a try through Stunnel.
>>     
>
> "telnet" and "stunnel telnet" are not the same thing.


Of course not. Stunnel is providing a secure tunnel for telnet.


> The openssl command I used is essentially an stunnel telnet.
>   


Yes, and a very verbose method.

 > "[ lots of openssl output ]" ;-)


>> The /etc/stunnel/stunnel.conf stanza would be something like this:
>>
>> [nntps]
>> accept = 119
>> connect = news.panix.com:563
>>     
>
> Using inews over stunnel is probably a good solution for the poster.
> The inews from trn4, among others, will read user and password from
> a ~/.nntpauth file to login once connected. That would probably be
> all the poster needs.
>
> Elijah
> ------
> has never used stunnel, always used the openssl commands
>   


Your method certainly works, "openssl s_client -connect 
news.panix.com:563" but what about the person who is not using any CLI? 
Stunnel is an ideal solution.

Note that openssl(1ssl) states for the s_client command:


    s_client  This implements a generic SSL/TLS client which can
    establish a transparent
              connection to a remote server speaking SSL/TLS. It’s
    intended for testing
              purposes only and provides only rudimentary interface
    functionality but
              internally uses mostly all functionality of the OpenSSL
    ssl library.



The OP simply asked "how to post from the command line" and I provided 
one solution: telnet.

You provided another: openssl.

I realize the Subject includes "snews" and telnet is not usable for 
SSL/TLS without a helper, like Stunnel.

You might see my particular use more clearly if I provide the 
information that I have a BIND9 DNS server, plus a Stunnel server. 
Having these available, I simply use "stunnel" in the NNTP server 
configuration for any newsreader (or telnet) that doesn't natively 
support SSL/TLS.

That one Stunnel server can handle these nntps connections, as well as 
pop3s, imaps, ssmtp and https for the whole organization, including ssh 
from and to various port numbers as a router would.


-- 
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?
Re: CLI tools that can handle snews:// URLs
#251610
Author: Anonymous
Date: Sun, 16 Sep 2012 22:41
9 lines
1163 bytes
>You have fouled up the attribution. That quote is not mine.

Thanks for pointing that out.  The quoting was done by "formail -rk",
and apparently it does not do attribution.

Bummer!

My manual snipping left in the previous attribution.
accessing TLS/SSL services, including snews://
#251611
Author: Ivan Shmakov
Date: Tue, 18 Sep 2012 10:39
77 lines
4079 bytes
>>>>> John F Morse <john@example.invalid> writes:

	[Cross-posting to news:comp.security.misc and
	news:comp.protocols.misc, just in case.  Please omit the latter
	when replying, unless the intent is to discuss the Telnet
	protocol.]

[...]

 > The OP simply asked "how to post from the command line" and I
 > provided one solution: telnet.

	May I remind you that the Telnet protocol has its own control
	sequences, and may be unsuitable for, e. g., transferring
	arbitrary binary data?  Arguably, a Netcat tool, such as nc6(1),
	or OpenBSD nc(1), would be a better fit.

	(For that reason, the hosts under my control rarely provide the
	telnet(1) client.)

 > You provided another: openssl.

	Let me provide the third: gnutls-cli(1).  Consider, e. g. (line
	wrapping by me), the following session.

$ gnutls-cli -p 563 news.panix.com 
Resolving 'news.panix.com'...
Connecting to '166.84.1.69:563'...
- Certificate type: X.509
 - Got a certificate list of 1 certificates.
 - Certificate[0] info:
  - subject `C=US,ST=NY,L=New_York,
O=PANIX Public Access Networks Usenet News Servers,OU=news,
CN=news.panix.com,EMAIL=staff@panix.com',
 issuer `C=US,ST=NY,L=New_York,
O=PANIX Public Access Networks Usenet News Servers,OU=news,
CN=PANIX Public Access Networks Usenet News Servers CA,
EMAIL=staff@panix.com',

	[... Arguably, they should use a certificate signed by a
	recognized trusted party, such as, e. g., https://cacert.org/.]

 RSA key 2048 bits, signed using RSA-SHA,
 activated `2012-01-20 19:20:16 UTC',
 expires `2022-01-17 19:20:16 UTC',
 SHA-1 fingerprint `e588294d02985ea671e2c2a7e84f23c524b755bc'
- The hostname in the certificate matches 'news.panix.com'.
- Peer's certificate issuer is unknown
- Peer's certificate is NOT trusted
- Version: TLS1.0
- Key Exchange: RSA
- Cipher: AES-128-CBC
- MAC: SHA1
- Compression: NULL
- Handshake was completed

- Simple Client Mode:

200 reader1.panix.com InterNetNews NNRP server INN 2.3.3 ready (posting ok).
QUIT
205 .
- Peer has closed the GNUTLS connection
$ 

 > I realize the Subject includes "snews" and telnet is not usable for
 > SSL/TLS without a helper, like Stunnel.

	I still don't get how using two TCP connections (Netcat or
	Telnet to Stunnel, and Stunnel to TLS/SSL server) could be
	better than using a single one (openssl or gnutls-cli to TLS/SSL
	server.)

[...]

-- 
FSF associate member #7257
Re: accessing TLS/SSL services, including snews://
#251616
Author: John F. Morse
Date: Tue, 18 Sep 2012 15:50
97 lines
4620 bytes
Ivan Shmakov wrote:
>>>>>> John F Morse <john@example.invalid> writes:
>>>>>>             
>
> 	[Cross-posting to news:comp.security.misc and
> 	news:comp.protocols.misc, just in case.  Please omit the latter
> 	when replying, unless the intent is to discuss the Telnet
> 	protocol.]
>   


[Crossposting removed to keep reply within original newsgroup]


> [...]
>
>  > The OP simply asked "how to post from the command line" and I
>  > provided one solution: telnet.
>
> 	May I remind you that the Telnet protocol has its own control
> 	sequences, and may be unsuitable for, e. g., transferring
> 	arbitrary binary data?  Arguably, a Netcat tool, such as nc6(1),
> 	or OpenBSD nc(1), would be a better fit.
>
> 	(For that reason, the hosts under my control rarely provide the
> 	telnet(1) client.)
>
>  > You provided another: openssl.
>
> 	Let me provide the third: gnutls-cli(1).  Consider, e. g. (line
> 	wrapping by me), the following session.
>
> $ gnutls-cli -p 563 news.panix.com 
> Resolving 'news.panix.com'...
> Connecting to '166.84.1.69:563'...
> - Certificate type: X.509
>  - Got a certificate list of 1 certificates.
>  - Certificate[0] info:
>   - subject `C=US,ST=NY,L=New_York,
> O=PANIX Public Access Networks Usenet News Servers,OU=news,
> CN=news.panix.com,EMAIL=staff@panix.com',
>  issuer `C=US,ST=NY,L=New_York,
> O=PANIX Public Access Networks Usenet News Servers,OU=news,
> CN=PANIX Public Access Networks Usenet News Servers CA,
> EMAIL=staff@panix.com',
>
> 	[... Arguably, they should use a certificate signed by a
> 	recognized trusted party, such as, e. g., https://cacert.org/.]
>
>  RSA key 2048 bits, signed using RSA-SHA,
>  activated `2012-01-20 19:20:16 UTC',
>  expires `2022-01-17 19:20:16 UTC',
>  SHA-1 fingerprint `e588294d02985ea671e2c2a7e84f23c524b755bc'
> - The hostname in the certificate matches 'news.panix.com'.
> - Peer's certificate issuer is unknown
> - Peer's certificate is NOT trusted
> - Version: TLS1.0
> - Key Exchange: RSA
> - Cipher: AES-128-CBC
> - MAC: SHA1
> - Compression: NULL
> - Handshake was completed
>
> - Simple Client Mode:
>
> 200 reader1.panix.com InterNetNews NNRP server INN 2.3.3 ready (posting ok).
> QUIT
> 205 .
> - Peer has closed the GNUTLS connection
> $ 
>
>  > I realize the Subject includes "snews" and telnet is not usable for
>  > SSL/TLS without a helper, like Stunnel.
>
> 	I still don't get how using two TCP connections (Netcat or
> 	Telnet to Stunnel, and Stunnel to TLS/SSL server) could be
> 	better than using a single one (openssl or gnutls-cli to TLS/SSL
> 	server.)
>
> [...]
>   


You seem to be obsessed with the value of one protocol over another.

My original reply was, as I stated it earlier (above):

 "> The OP simply asked "how to post from the command line" and I
 "> provided one solution: telnet."



-- 
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?
Re: accessing TLS/SSL services, including snews://
#251621
Author: Ivan Shmakov
Date: Tue, 18 Sep 2012 16:56
18 lines
1910 bytes
>>>>> John F Morse <john@example.invalid> writes:

[...]

 > My original reply was, as I stated it earlier (above):

 ">> The OP simply asked "how to post from the command line" and I
 ">> provided one solution: telnet."

	... And it was promptly pointed out that it isn't the only one
	available.

	That being said, I fail to imagine a situation where telnet(1)
	would be a better choice than Netcat for a "generic" network
	client.

-- 
FSF associate member #7257
Re: accessing TLS/SSL services, including snews://
#251623
Author: tlvp
Date: Wed, 19 Sep 2012 00:29
20 lines
2281 bytes
On Tue, 18 Sep 2012 23:56:09 +0700, Ivan Shmakov wrote, or quoted:

>  ">> The OP simply asked "how to post from the command line" and I
>  ">> provided one solution: telnet."
> 
> 	... And it was promptly pointed out that it isn't the only one
> 	available.

But providing one solution isn't claiming that's the only one available ...
 
> 	That being said, I fail to imagine a situation where telnet(1)
> 	would be a better choice than Netcat for a "generic" network
> 	client.

... nor is it claiming that's the best one available -- at most, it's just
demonstrating concretely that there's at least one available :-) .

Cheers, -- tlvp
-- 
Avant de repondre, jeter la poubelle, SVP.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads