Tcp: responding to a server's acknowledgment

  • Thread starter Thread starter deostroll
  • Start date Start date
D

deostroll

Hi,

I am not that experienced with tcp programming. Lately I am trying to
understand how I can respond to server acknowledgements. I guess they come
into picture only if you send some IAC DO instructions to the server. I am
not sure though. I have posted a full account of my problem over @ msdn
forums. Not got a response so far. Below is the link to it:
http://social.msdn.microsoft.com/Fo...m/thread/1693020a-0e17-40b5-8868-53df02228eae

Hoping I can find some advice. Thanx in advance.

--deostroll
 
deostroll said:
Hi,

I am not that experienced with tcp programming. Lately I am trying to
understand how I can respond to server acknowledgements. I guess they come
into picture only if you send some IAC DO instructions to the server. I am
not sure though. I have posted a full account of my problem over @ msdn
forums. Not got a response so far. Below is the link to it:
http://social.msdn.microsoft.com/Fo...m/thread/1693020a-0e17-40b5-8868-53df02228eae

Hoping I can find some advice. Thanx in advance.

--deostroll

The acknowledgment you are talking about is internal to TCP protocol. It's
not passed to an application and the application does not need to respond to
it (it can't). OS will handle that. Your problem is somwhere in the
implementation of telnet protocol.

Regards,
Goran
 
Your problem is somwhere in the
implementation of telnet protocol.
Goran

So how do I implement it? I hope u see there is a challenge here. I
don't exactly understand what I have to send to the remote machine via
telnet. I have to keep discovering that using the wireshark tool...

--deostroll
 
deostroll said:
So how do I implement it? I hope u see there is a challenge here. I
don't exactly understand what I have to send to the remote machine via
telnet. I have to keep discovering that using the wireshark tool...

--deostroll

Telnet protocol is specified in:
http://www.faqs.org/rfcs/rfc854.html

There are probably lot resources on the internet about telnet protocol.
Reverse engineering using wireshark is a bit tricky and unnecessary IMHO.

Regards,
Goran
 
deostroll said:
I still can't develop a NVT just by reading that...are there any texts/
books which explain how to go about implementing it...?

--deostroll

Shouldn't be so difficult, you probably could implement only few options and
refuse most... Anyway, there are lot of free telnet clients with source code
available on the internet:

http://www.google.hr/search?q=telnet+client+source

Regards,
Goran
 
Thanx I did find a good library on sourceforge. Now I am able to send
commands and navigate to menus, etc. But I've stumbled over another
problem...parsing the data I receive over the socket. I remove all those
chars which do not fall in the set of alphabets. I allow normal puncutations
and numbers too to appear...but it seems there are sequences of characters
which make no sense (and which fall in the above range) "interspersed"
between text I am looking for. What do you know about parsing such kind of
data?

--deostroll
 
New development:

The data I am talking about prints correctly in a unix shell. I.e. if you
use an "echo -e " followed by the data you've received in single quotes (viz
denotes a string in unix shell) it prints exactly the way I can see on the
windows command prompt using telnet.exe - the command-line tool for
telnetting.

Do you know anything that does something similar to this? I am looking at
retaining the "transformed" string into memory so I can later work with it...

--deostroll
 
deostroll said:
New development:

The data I am talking about prints correctly in a unix shell. I.e. if you
use an "echo -e " followed by the data you've received in single quotes
(viz
denotes a string in unix shell) it prints exactly the way I can see on the
windows command prompt using telnet.exe - the command-line tool for
telnetting.

Do you know anything that does something similar to this? I am looking at
retaining the "transformed" string into memory so I can later work with
it...

--deostroll

These are probably terminal control characters (aka non-printables)... For
example, cursor left, down etc... I think there are many types of virtual
terminals, but checking VT100 is probably a good guess for a start.

http://www.cs.utk.edu/~shuford/terminal/vt100_codes_news.txt

Regards,
Goran
 
Back
Top