Live data from Hacker News

"cat readme.txt" is not safe if you use iTerm2

blog.calif.io

61–70 of 197 posts

Re: "cat readme.txt" is not safe if you use iTerm2

#61
post #54

Back in the PDP-10 days, one communicated with it using a terminal attached to it. One of my fellow students discovered that if you hit backspace enough times, the terminal handler would keep erasing characters before the buffer. Go far enough, and then there was an escape character (Ctrl-u?) that would delete the whole line. Poof went the operating system!

control+u for line-kill is probably a recent thing, a random PDF of "The Unix Programming Environment" (Kernighan & Pike, 1984, p.6) has @ as the line-kill character (and # is erase which these days may or may not be control+? (linux often does something wrong with the delete key, unlike the *BSD)).

TOPS-20 used ^U. (That's where BSD got it, along with ^W, whence it percolated into other *nix.)

Re: "cat readme.txt" is not safe if you use iTerm2

#62
post #49
post #42

Earlier quoted context omitted.

seems they removed the dangers, but didn't provide an alternative to write safe terminal apps.

Graphics. They're network transparent, and take over the terminal. Terminal apps were obsolete once we had invented the pixel. Unix just provides no good way to write one that can be used remotely.

A network-transparent graphics protocol? Who would ever think of such a thing?

Re: "cat readme.txt" is not safe if you use iTerm2

#64
The title is sensationalist; cat is fine. What is unsafe is iTerm's ssh integration, which is pretty obviously unsafe, because it includes a side control channel that is not cleanly separated from the the data stream. Don't use it, use normal ssh, and all should be fine.

Re: "cat readme.txt" is not safe if you use iTerm2

#65
post #49
post #42

Earlier quoted context omitted.

seems they removed the dangers, but didn't provide an alternative to write safe terminal apps.

Graphics. They're network transparent, and take over the terminal. Terminal apps were obsolete once we had invented the pixel. Unix just provides no good way to write one that can be used remotely.

Unix just provides no good way to write one that can be used remotely

well that's the issue, isn't it?

the graphics options that we have are slow and complex, and they don't solve the problems like a terminal and therefore the terminal persist.

Re: "cat readme.txt" is not safe if you use iTerm2

#66

Back in the PDP-10 days, one communicated with it using a terminal attached to it. One of my fellow students discovered that if you hit backspace enough times, the terminal handler would keep erasing characters before the buffer. Go far enough, and then there was an escape character (Ctrl-u?) that would delete the whole line. Poof went the operating system!

[flagged]

LOL. It's a fact. It was discovered by a fellow student.

Re: "cat readme.txt" is not safe if you use iTerm2

#68
post #62
post #49

Earlier quoted context omitted.

Graphics. They're network transparent, and take over the terminal. Terminal apps were obsolete once we had invented the pixel. Unix just provides no good way to write one that can be used remotely.

A network-transparent graphics protocol? Who would ever think of such a thing?

that's actually not what i am after. what i envision is a graphical terminal, that is a terminal that uses graphic elements to display the output.

consider something like grep on multiple files. it should produce a list of lines found. the graphical terminal takes that list and displays it. it can distinguish the different components of that list, the filenames, the lines matched, the actual match, etc. because it can distinguish the elements, it can lay them out nicely. a column for the filenames, colors for the matched parts, counts, etc.

grep would not produce any graphics here, just semantic output that my imagined graphical terminal would be able to interpret and visualize.

Re: "cat readme.txt" is not safe if you use iTerm2

#69
post #55
post #52

> A terminal used to be a real hardware device: a keyboard and screen connected to a machine, with programs reading input from that device and writing output back to it. > A terminal emulator like iTerm2 is the modern software version of that hardware terminal. That's the fundamental fatal flaw of emulating a bad dead hardware design. Are there any attempts to evolve here past all these weird in-band escape sequences…

Yes. It’s called the X Window System and it’s been around since the ‘80s. Also the problem here isn’t that iterm2 is trying to emulate terminals, it’s that it’s trying to do something more over the same network connection without making changes to the ssh protocol.

X11 or any network transparent graphics protocol doesn't solve the problems that a terminal solves. how do you pipe data through multiple applications in one command using a GUI for example? nobody has been able to solve that in a practical way yet.

what we really want is being able to pipe semantic data that can be output to some kind of graphical device/interface that uses that semantic information to display the data using nice graphical interface elements.

Re: "cat readme.txt" is not safe if you use iTerm2

#70

Earlier quoted context omitted.

LOL. It's a fact. It was discovered by a fellow student.

[flagged]

> It’s quite impossible.

Do you know all about 1970s operating systems? Why do you find it hard to believe that a loop deleting backwards from the buffer wouldn't, say, zero out the stack frame and then a function return crashes it?

> Was it identified as a bug or vulnerability?

What difference does that make? It crashed the -10. It was reported.

> What OS, even?

The TOPS-10 operating system, or its predecessor. I don't recall just when TOPS-10 came out. It was 50 years ago.

Post reply on HN