hoobastank Posted March 1, 2011 Share Posted March 1, 2011 Hi, I need some telnet function written by php. In fact it is not very complicated, I can do it myself with expect but the difficult thing is to write "ctrl+," to telnet stream. Connecting to device is a little bit weird. Login prompt doesnt appear on cli without sending "ctrl+,". If you send "ctrl+," then "?" appears after you can write "login" to write your user name... something like that Connected to 1.1.1.1 (1.1.1.1). Escape character is '^M'. here it is waiting for ctrl+, and after ? appears, now you can write login ?login Enter name: it's waiting for user name. How can I send "ctrl+," character via fwrite function of php? Link to comment https://forums.phpfreaks.com/topic/229263-php-telnet-fwrite-ctrl/ Share on other sites More sharing options...
hoobastank Posted March 1, 2011 Author Share Posted March 1, 2011 I solved my problem with help of my friend. If you write 'ctrl+,' on vi editor, you see '^\' so File Separator. The interesting thing is I couldn't find anything on web that ctrl plus comma is equal to control character '^\', FS. Link to comment https://forums.phpfreaks.com/topic/229263-php-telnet-fwrite-ctrl/#findComment-1181587 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.