I'm not sure what you are trying to accomplish. Typically, Telnet is considered a protocol with a character in time, so when you say "incoming messages" do you mean that each character is a message? Or is the entire user session a message?
I will make some assumptions. You have users logging in through telnet, and you want to capture everything that they do during login. Later, you will want to associate the material that they did with this user, and the time and date when they did it. You will need to find it later to find out "who made" rm * "as root?"
I would save each user session as a separate file with a naming convention that includes user registration and timestamp.
eg. 2008_09_08_14_52_07_nidonocu
Inside the file, I would capture every byte received, assuming that they would be mostly text characters.
eg.
ls cd www ls vi index.html /copyright 2007 llllllllllllr8:wq exit
Write 8-bit ANSI characters to a file. You should be able to use a text editor and grep to perform basic audits and searches. You can use the binary viewer or get more sophisticated information if you really need to read 8-bit data.
Backups, archiving, cleaning, etc. can be performed using common file system tools and scripts.
My apologies if my assumptions are wrong.
- Page Bruce
source share