A shell trick

Published on 2015 - 09 - 30

码瘟给我发了个好玩的东西

printf '#!/bin/bash\necho doing something evil!\nexit\n\033[2Aecho doing something very nice!\n' >backdoor.sh
chmod +x backdoor.sh
cat backdoor.sh
./backdoor.sh

man ascii 查了下\033是ESC,理论上通过这种控制符能玩出很多花样。
相关链接