Assuming line feeds suggests you don't know your input. Find the documentation and understand it then come back and explain it so others can grasp the source and format. Right now your taking a blind shot that someone will recognize it.
Those lines remind me of VT Terminal control codes. That would likely be non-compatible with UITextView.
Hi xStep,
my apologies.
I'm making an SSH shell, as a telnet shell is 1) insecure, and 2) windows shell server is best running on ssh and our cisco equipment is only allowing ssh since last few weeks.
I'm creating an shell in xcode, so I can wrap a gui around it with some usefull functions for user management, server management, cisco management etc.
Currently I'm running the commercial bitvise ssh server on our windows systems.
Now for me this is quite simple to use by terminal, but it's all taking time and building a gui around it would be great.
For our network management I wrote the same kind of applciation.
For some reason bitvise is giving me this output back incl my result, this is a full example of a result of login and dir c:
Code:
[?7l[H[2J[?25l[1;1H[37m[40m [2;1H [3;1H [4;1H [5;1H [6;1H [7;1H [8;1H [9;1H [10;1H [11;1H [12;1H [13;1H [14;1H [15;1H [16;1H [17;1H [18;1H [19;1H [20;1H [21;1H [22;1H [23;1H [24;1H [?12l[?25h[1;1HMicrosoft Windows [Version 6.3.9600][2;1H(c) 2013 Microsoft Corporation. All rights reserved.]2;Administrator: Command Prompt[4;1HC:\Users\Administrator.DENNIS>dir c:
dir c:]2;Administrator: Command Prompt - dir c:[6;1H Volume in drive C has no label.[7;1H Volume Serial Number is AA8C-AC49[9;1H Directory of C:\Users\Administrator.DENNIS[11;1H08/12/15 07:50 PM <DIR> .[12;1H08/12/15 07:50 PM <DIR> ..[13;1H08/22/13 05:39 PM <DIR> Desktop[14;1H08/12/15 07:50 PM <DIR> Documents[15;1H08/22/13 05:39 PM <DIR> Downloads[16;1H08/22/13 05:39 PM <DIR> Favorites[17;1H08/22/13 05:39 PM <DIR> Links[18;1H08/22/13 05:39 PM <DIR> Music[19;1H08/22/13 05:39 PM <DIR> Pictures[20;1H08/22/13 05:39 PM <DIR> Saved Games[21;1H08/22/13 05:39 PM <DIR> Videos[22;1H 0 File(s) 0 bytes[23;1H 11 Dir(s) 56,807,833,600 bytes free]2;Administrator: Command Prompt[24;1H
[24;1H [24;1HC:\Users\Administrator.DENNIS>
p.s. I already tried a manual parse on [24;1H, but this ends up in a load of line feeds, which are not in my own mac's terminal application.
When I logon with terminal (I have all settings default, so it's white with black text), the window becomes black with white text etc.
No weird codes like above.
So I assumed that this output I get in my application first was ANSI but after some research I found out it is Terminal Escape Sequences. I tried different type of pty pty types: Vanilla, VT100, VT102, VT220, normal Ansi, and Xterm
Xterm gives me the best output, but still with these commands, these are in the data I receive back, and so written to the NSTextView.
Is there any API for this? Or a different approuch? I'd like to support this when it occures.
It should be stuff as text color, background color, text highlight color etc