Box-drawing characters on Linux console

311 views
Skip to first unread message

Jakub Wilk

unread,
Jan 14, 2015, 8:35:58 AM1/14/15
to afl-...@googlegroups.com
Hi folks!

afl-uses "\x1b(0" for switching into VT100 line-drawing mode, which
unfortunately doesn't work on Linux console. Instead, you get something
as lovely as this:

tq cycle progress qqqqqqqqqqqqqqqqqqqqw
x now processing : 316 (15.51%) x
x paths timed out : 0 (0.00%) x
tq stage progress qqqqqqqqqqqqqqqqqqqqn

(A work-around is to run afl-fuzz under screen or tmux.)

What has worked for me on every terminal I tried (Linux console, urxvt,
xterm) is to:
1) leave G0 alone;
2) set G1 to the VT100 graphics mapping: "\x1b)0";
3) to start box-drawing mode, switch to G1: "\x0e";
3) to end box-drawing mode, switch to G0: "\x0f".

Hopefully this method doesn't have any negative side-effects... But I'm
not a terminal expert, so you may never know. :->

--
Jakub Wilk

Michal Zalewski

unread,
Jan 14, 2015, 2:35:05 PM1/14/15
to afl-users
> 1) leave G0 alone;
> 2) set G1 to the VT100 graphics mapping: "\x1b)0";
> 3) to start box-drawing mode, switch to G1: "\x0e";
> 3) to end box-drawing mode, switch to G0: "\x0f".

Nice catch, I always run it on screen, so didn't notice. Checked that
your solution also works well on OpenBSD console, so good enough for
me.

/mz
Reply all
Reply to author
Forward
0 new messages