Telnet Response after admin login

i need help with decoding the response send by the Mikrotik after a successful login via Telnet. Supposedly i’ll get response after typing “ip address print”, but i get strange characters for the response. i get this response “p [9999B [9999B Z [6n”.

i have this code for printing the response.

Question:
What type of response does Mikrotik send after a successful login via Telnet, is it String or Char or ???
Badly need help with this one.

Those are ANSI standard escape sequences that are used to do cursor movement, set colors, etc.
You can do a telnet login with options to disable that.
See the wiki: https://wiki.mikrotik.com/wiki/Manual:Console_login_process

If you want to automate configuration tasks, you’d better use the built in API functionality (or SSH at least).

https://wiki.mikrotik.com/wiki/Manual:API