Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am thinking of a scenario where unknown stream of data is printed to a terminal, isn't it so that some sequences of characters may be interpreted as commands and corrupt the system state? Or the worst that can happen is that the terminal itself goes haywire as a result of switching state, code pages and what not?

Basically, I am wondering what are the potential consequences of dumping random or unknown sequence of octets to a terminal? Let's consider typical Linux terminals such as xterm, 'gnome-terminal' and the terminal in Mac OS X 10.8.

share|improve this question
    
If you mean a string representing binary, I would go with no. If you are talking more along the lines of piping binary in, then maybe. –  AthomSfere Sep 24 '13 at 16:45

2 Answers 2

up vote 1 down vote accepted

There is potential danger. While in theory, dumping "garbage" to a terminal should do no harm, you never know if there is a bug in the code behind the terminal. A certain binary string could have unintended consequences.

share|improve this answer
    
Of course, that can be said about any piece of software, processing any type of data. –  Daniel R Hicks Sep 25 '13 at 11:24

There was an exposure in early versions of DOS where doing a DIR of a diskette could (if certain options were enabled for the system) cause commands to be executed off the diskette, potentially installing a virus. The key here was that a console display system was set up to interpret certain character combos as commands. I'm not aware of any "modern" DOS/Windows versions where this is true (outside of HTML, et al), but I know little about xterm et al (which to some degree simulate those old environments), and there could also be a similar danger in some GUI environments.

Way back in the Teletype days, you could damage some teleprinters by sending them "pure binary" data that would cause invalid mechanical sequences. No modern printers should have this problem (though of course the problem of sometimes printing page after page of essentially nothing remains to this day).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.