🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Dhaval Shah Fri, 16 Aug 2002 01:01
Extracting info from a NNTP
#59893
Author: Dhaval Shah
Date: Fri, 16 Aug 2002 01:01
13 lines
1575 bytes
Hi all,
I'm developing a software in Delphi6 that "sniffs" the NNTP session on a 
PC and want to report the newsgroup name, contents that the user sent.
I've got the logic of getting the dump of the session but it contains 
lot of "junk".
Could anybody pls. help me identifying the positions of the newsgroup 
headers (where it was sent) and the contents (message body) only??
Best regards

Dhaval Shah
Sr. software Developer

Re: Extracting info from a NNTP
#59895
Author: J.B. Moreno
Date: Fri, 16 Aug 2002 05:50
25 lines
2157 bytes
In article <3D5C4F5E.1010105@phonecontrol.com.au>, 
 Dhaval Shah <dhaval@phonecontrol.com.au> wrote:

> Hi all,
> I'm developing a software in Delphi6 that "sniffs" the NNTP session on a 
> PC and want to report the newsgroup name, contents that the user sent.
> I've got the logic of getting the dump of the session but it contains 
> lot of "junk".
> Could anybody pls. help me identifying the positions of the newsgroup 
> headers (where it was sent) and the contents (message body) only??
> Best regards

Not sure what you mean -- if you're watching a NNTP session (traffic on
port 119) then you'll have to do the same as the client and server;
recognize what commands have been given and their responses.  If you
want to record what was posted, you'll have to watch and know when a
POST
command has been given (and not just appearing in the body of a message
being read or posted) and then pull it out of the headers sent (you'll
probably also want to see what response is given, so that you can
record whether the server accepted the post or not).

-- 
J.B. Moreno
Re: Extracting info from a NNTP
#59915
Author: Klaas
Date: Sat, 17 Aug 2002 00:54
31 lines
2290 bytes
After careful consideration, Dhaval Shah muttered:

> Hi all,
> I'm developing a software in Delphi6 that "sniffs" the NNTP session on
> a PC and want to report the newsgroup name, contents that the user
> sent. I've got the logic of getting the dump of the session but it
> contains lot of "junk".
> Could anybody pls. help me identifying the positions of the newsgroup 
> headers (where it was sent) and the contents (message body) only??
> Best regards

Sounds like an app to allow an employer to track usenet activity of
employees during work hours. 

Anyway, what you're looking for is this:

client sends "POST<CrLf>"
server responds with "340 <some message><crlf>" if posting is okay
client then sends headers separated by <crlf>'s, ending with a double
<crlf> to signify the start of the body.  "<crlf>.<crlf>" signifies the
end of the body. 

The header you are looking for is (unsurprisingly) "Newsgroups:", which
contains a comma-separated list of newsgroups to which the article was
posted.  From:, Sender: and Subject: headers will be useful if you are
logging this activity (you should log Message-ID: too). 

<crlf> is a carriage-return linefeed combo (0x0D 0x0A)

-Mike
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