Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Languages, Compilers, Interpreters
Register

Reply
 
LinkBack Thread Tools
Old 22.03.2002, 22:46   #1
»
 
z0mbie's Avatar
 
Join Date: 01 2002
Posts: 777
Downloads: 1
Uploads: 0
Reputation: 0 | 0
Question sockets & port 23

..
struct sockaddr_in Saddr;
SOCKET Sock=socket(AF_INET,SOCK_STREAM,0);
Saddr.sin_family=AF_INET;
Saddr.sin_port=htons(23);
//dal'she connect i t.d...
recv(Sock,buffer,sizeof(buffer),0);

pri podklyuchenii k portam 25,80 i t.d. poluchayu normal'nыy text a na 23 - "_¤_¤_¤#_¤'_¤$+" ..
v chem delo ? port 23 chem-to otlichaetsya ot drugix ?
Reply With Quote
Old 22.03.2002, 23:52   #2
Консервативн
 
VX's Avatar
 
Join Date: 01 2002
Location: Кавказская Албания
Posts: 889
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Post

net nichem ne otlicahetsa, u menja toje taka problema bila s nekotoimi serverra, ocen' mojet bit sto server compressit vse danni kotorie posilaet (naprimer rabotaet mod_gzip).
ili vojmojno cto nujno vkluchit' binary mode ...
Reply With Quote
Old 23.03.2002, 01:31   #3
»
 
z0mbie's Avatar
 
Join Date: 01 2002
Posts: 777
Downloads: 1
Uploads: 0
Reputation: 0 | 0
Post

connectyus' ya k freenetu..
obыchnыm telnet clientom vse OK..
i kak vklyuchit' binary mode ?
Reply With Quote
Old 23.03.2002, 06:41   #4
Консервативн
 
VX's Avatar
 
Join Date: 01 2002
Location: Кавказская Албания
Posts: 889
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Post

Rasskaji po podrobnie..(mojesh po email)..
cto ti konkretno posilaesh..da i eshe poproboi WSAsend WSArecv esli ti pod windami...i eshe rfc po telnetu.
Reply With Quote
Old 24.03.2002, 00:03   #5
»
 
z0mbie's Avatar
 
Join Date: 01 2002
Posts: 777
Downloads: 1
Uploads: 0
Reputation: 0 | 0
Post

Quote:
Originally posted by VX:
Rasskaji po podrobnie..(mojesh po email)..
cto ti konkretno posilaesh..da i eshe poproboi WSAsend WSArecv esli ti pod windami...i eshe rfc po telnetu.
nu dlya nachala xochu xotya bы poluchit' "welcome ... login: " :]
Reply With Quote
Old 26.03.2002, 00:04   #6
Бакалавр
 
Join Date: 03 2002
Location: Detroit, MI, USA
Posts: 482
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Post

Hi,
I believe, that the problem is, that you didn't implement Telnet protocol.
Let me inform you, that Telnet does not just assume sending and recieveving text messages. It contains much more commands (I mean protocol commands)...
I believe, in your case, the server on the other side configured to send some escape sequences to configure client (For example to configure session parameters such as color).
My suggestion will be to take a look at Telnet RFC (Unfortunatelly, I don't remember the number).

Regards,
Hovhannes
__________________
Hovhannes Tumanyan,
CISSP
Reply With Quote
Old 23.04.2002, 06:33   #7
Дошкольник
 
Join Date: 03 2002
Location: Yerevan
Posts: 111
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Post

А по мне, скорее 80 ненормален, чем 23. Было бы логичне было встретить бинарный application layer protocol, чем ascii по стандарту telnet. HTTP, FTP, SNTP... текстовые, и вообще на человека расчитаны, а не на машину...
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 15:36.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.