答案1
这可能是一个终端转义序列;您可以提取这些内容并逐一打印它们,以查看特定序列是否会导致崩溃:
#!/usr/bin/env perl
use strict;
use warnings;
# turn off any encoding foo
use open IO => ':raw';
# "slurp" mode for whole file reads
local $/;
# for any STDIN or files given to us...
while (readline) {
# extract ESC-followed by a number of not-ESC not-NUL characters...
while (m/(\e[^\e\0]+)/g) {
printf "what does '%vx' do?\n", $1;
print $1;
# is a listing borked or not?
print qx(ls);
sleep 1;
}
}