Bluehost.com Web Hosting $6.95

telent: strange char at start connection. Please help me!

This is a discussion on telent: strange char at start connection. Please help me! within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hallo, I find a library very userfull form connect by telnet. Just a question: The library sends strange data: why? ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-16-2006
_mario.lat
 
Posts: n/a
Default telent: strange char at start connection. Please help me!

Hallo,
I find a library very userfull form connect by telnet.
Just a question:

The library sends strange data: why? what is userfull for these data?
I mean these:


[...]
$this->conn1=chr(0xFF).chr(0xFB).chr(0x1F).chr(0xFF).chr (0xFB).
chr(0x20).chr(0xFF).chr(0xFB).chr(0x18).chr(0xFF). chr(0xFB).
chr(0x27).chr(0xFF).chr(0xFD).chr(0x01).chr(0xFF). chr(0xFB).
chr(0x03).chr(0xFF).chr(0xFD).chr(0x03).chr(0xFF). chr(0xFC).
chr(0x23).chr(0xFF).chr(0xFC).chr(0x24).chr(0xFF). chr(0xFA).
chr(0x1F).chr(0x00).chr(0x50).chr(0x00).chr(0x18). chr(0xFF).
chr(0xF0).chr(0xFF).chr(0xFA).chr(0x20).chr(0x00). chr(0x33).
chr(0x38).chr(0x34).chr(0x30).chr(0x30).chr(0x2C). chr(0x33).
chr(0x38).chr(0x34).chr(0x30).chr(0x30).chr(0xFF). chr(0xF0).
chr(0xFF).chr(0xFA).chr(0x27).chr(0x00).chr(0xFF). chr(0xF0).
chr(0xFF).chr(0xFA).chr(0x18).chr(0x00).chr(0x58). chr(0x54).
chr(0x45).chr(0x52).chr(0x4D).chr(0xFF).chr(0xF0);
$this->conn2=chr(0xFF).chr(0xFC).chr(0x01).chr(0xFF).chr (0xFC).
chr(0x22).chr(0xFF).chr(0xFE).chr(0x05).chr(0xFF). chr(0xFC).chr(0x21);

[...]
$this->fp=fsockopen($ip,23)
fputs($this->fp,$this->conn1);
fputs($this->fp,$this->conn2);
[...]


why to send $this->conn1 and $this->fp?
What is userfull for?

Thank you in advance for the time you'l spend for me!
Mario.

Reply With Quote
  #2 (permalink)  
Old 12-18-2006
petersprc
 
Posts: n/a
Default Re: telent: strange char at start connection. Please help me!

Hi,

The message you're seeing is an "Interpret As Command" sequence that
sets up various options and initiates certain commands on the telnet
connection. See RFC854 (Telnet Command Structure):

http://www.ietf.org/rfc/rfc0854.txt

For instance, 0xFF 0xFB 0x1F probably enables the NAWS option that
allows a client to convey window size to a telnet server:

http://www.ietf.org/rfc/rfc1073.txt

_mario.lat wrote:
> Hallo,
> I find a library very userfull form connect by telnet.
> Just a question:
>
> The library sends strange data: why? what is userfull for these data?
> I mean these:
>
>
> [...]
> $this->conn1=chr(0xFF).chr(0xFB).chr(0x1F).chr(0xFF).chr (0xFB).
> chr(0x20).chr(0xFF).chr(0xFB).chr(0x18).chr(0xFF). chr(0xFB).
> chr(0x27).chr(0xFF).chr(0xFD).chr(0x01).chr(0xFF). chr(0xFB).
> chr(0x03).chr(0xFF).chr(0xFD).chr(0x03).chr(0xFF). chr(0xFC).
> chr(0x23).chr(0xFF).chr(0xFC).chr(0x24).chr(0xFF). chr(0xFA).
> chr(0x1F).chr(0x00).chr(0x50).chr(0x00).chr(0x18). chr(0xFF).
> chr(0xF0).chr(0xFF).chr(0xFA).chr(0x20).chr(0x00). chr(0x33).
> chr(0x38).chr(0x34).chr(0x30).chr(0x30).chr(0x2C). chr(0x33).
> chr(0x38).chr(0x34).chr(0x30).chr(0x30).chr(0xFF). chr(0xF0).
> chr(0xFF).chr(0xFA).chr(0x27).chr(0x00).chr(0xFF). chr(0xF0).
> chr(0xFF).chr(0xFA).chr(0x18).chr(0x00).chr(0x58). chr(0x54).
> chr(0x45).chr(0x52).chr(0x4D).chr(0xFF).chr(0xF0);
> $this->conn2=chr(0xFF).chr(0xFC).chr(0x01).chr(0xFF).chr (0xFC).
> chr(0x22).chr(0xFF).chr(0xFE).chr(0x05).chr(0xFF). chr(0xFC).chr(0x21);
>
> [...]
> $this->fp=fsockopen($ip,23)
> fputs($this->fp,$this->conn1);
> fputs($this->fp,$this->conn2);
> [...]
>
>
> why to send $this->conn1 and $this->fp?
> What is userfull for?
>
> Thank you in advance for the time you'l spend for me!
> Mario.


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:30 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0