Odd behavior when connecting to my program

I use Twisted to implement the server. When I test it, the first line that it gets is always strange:

Starting Server... New connection from 192.168.1.140 192.168.1.140: ÿûÿû ÿûÿû'ÿýÿûÿý\NAME Blurr 192.168.1.140: \NAME Blurr 

(for both inputs sent to \NAME Blurr .)

This is the code that prints the input:

 def lineReceived(self, line): print "{0}: {1}".format(self.name, line) 

I connect via Putty via Telnet to a remote host. Is it the telnet protocol that I skip, or what? When I use telnet Unix and connect locally, the first line is fine.

+4
source share
2 answers

Here you can find an explanation of "ÿûÿû mystery" here . Short form: telnet is not a simple protocol, and what you see is a trace of telnet conversations (attempt) with a server that does not say "telnettese" ;-). A good guess is "this is the telnet protocol that I am missing"; -)

The RFCs involved in defining the telnet protocol are linked to this page if you want to debug further. I am not a specialist in shpakler, so I don’t know how to tell shpakler to avoid these negotiations (and act as a good old Telnet Unix client;).

+5
source

It was really the telnet protocol that I was missing. A connection like Raw instead of Telnet solved the problem.

+1
source

Source: https://habr.com/ru/post/1315143/


All Articles