banner

For a full list of BASHing data blog posts, see the index page.     RSS


SCI and 62;c62;c62;c...

The most annoying gremlin character I've come across is the Single Character Introducer (SCI), hex 9a. It's in the C1 group of control characters but its function doesn't seem to have been well defined.

SCI is annoying because it causes both the Gnome and Xfce GUI terminals to spit out a number of "62;c" strings and fail to return to a prompt. In the screenshots below, there are four SCIs buried in the record containing "MEL 2355240A" in file "rbgv". I have no idea how the SCIs got there, but just displaying this record is enough to start a "62;c" attack. In both terminals I can escape the "62;c" hang and return to a prompt with Ctrl+c.

gnome-terminal
 
xfce-terminal

Interestingly, xterm doesn't show this behaviour:

xterm

In the tab-separated record shown above, the SCI gremlins are in the strings beginning "Tíbet." in fields 21 and 22. An xxd check shows that the SCIs are hex c2 9a and appear after the "t" in "Motóri" and the "T" in "Torkónda":

xxd

The SCIs can be deleted with sed if the full c2 9a hex value is the looked-for pattern:

sed

So far as I've tested, SCI is the only control character that causes this "62;c" panic in GUI terminals. It can be safely detected with the "gremlins" script in A Data Cleaner's Cookbook:

script
 

Update. Timothy Bolton, an IT security pro in Texas (USA), has been exploring a range of character strings that do strange and unexpected things in terminals. From the results he sent I've learned that you can also get the "62;c" hang in Xfce4-terminal and gnome-terminal with

printf "\x1b\x5b\x35\x63"

but as with the SCI, there's no problem in xterm. Among other hazardous strings, Timothy has found one that causes xterm, Xfce4-terminal and gnome-terminal to print "1R" and hang:

printf "\x1b\x5b\x36\x6e"


Last update: 2020-01-13
The blog posts on this website are licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License