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? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.