Yes.
Definitively yes.
$ cat -e suspectfile.raw $ cat -e suspectfile.raw | less
$ less < <(cat -e suspectfile.raw)
$ which less cat /usr/bin/less /bin/cat $ rawless() { /usr/bin/less < <(/bin/cat -e "$@");}
AddendumRemarks
In fact, it was possible, in past... As this became an issue, these kinds of features was quickly removed, but...
When you read command not found, this implies that something was effectively injected.
$ cat <<< $'\033Z'
andOr another ANSI sequence: CSI c (Device Attributes):
$ cat <<< $'\033[c'
will print an empty line, but on next line prompted, you will see 1;2c (or maybe with another numbers, depending on terminal used) as if you hitted them.:
$ 65;1;9c█
... andbut with -e switch:
$ cat -e <<< $'\033Z' ^[Z$ $ cat -e <<< $'\033[c' ^[[c$
$ cat <<<$'\033Z';buf='';while<<<$'\033[c';buf='';while read -t .1 -n 1 chr;do buf+="$chr";done;printf buf+="$chr" done;printf "\n>|%q|<\n" $buf ^[[?1;2c65;1;9c >|$'\E[?1;2c'|<65;1;9c'|<
$ trySeq() { printf -v out "$1" echo -n "$out" buf="" while read -t.1 -n1 char do buf+="$char" done [ "$buf" ] && printf "\r|%q|->|%q|<\e[K\n" "$out" "$buf" }
$ for seq in $'\e['{c,{1..26}{n,t,x}};do trySeq "$seq";done |$'\E[c'|->|$'\E[?65;1;9c'|< |$'\E[1x'|->|$'\E[3;1;1;120;120;1;0x'|< |$'\E[5n'|->|$'\E[0n'|< ...
(maybe Maybe with some effectharmless effects on your console ;)
Sample for funSmall practical sample
$ source <(printf '%dc() { printf "You\\047ve been hitted\\041\\n";hitted\\041\\n" };\n' {0..100};printf 'alias %s=1c\n' {0..100};)
From thereThen, if you
$ cat <<<$'\e[c' $ 65;1;9c_65;1;9c█
Cursor will stay at end of command prompt line.
From there, if you machinally hit Return instead of Ctrl+c, you will read something like:
$ 65;1;9c bash: 65: commandYou've notbeen foundhitted! bash: 1: commandYou've notbeen foundhitted! You've been hitted! $ _█