应该还有更隐蔽的方法,不过目前是这样了。
1 |
|
编译以上代码为ttyecho
使用命令who发现有谁在登录当前的linux
比如其他用户的终端文件为/dev/pts/5,那么就使用以下命令在别人的终端下执行script /tmp/session.log命令。
1 | sudo ttyecho -n /dev/pts/5 “script /tmp/session.log” |
之后可以使用以下命令查看别人执行了什么。
1 | tail -f /tmp/session.log |
参考:http://www.humbug.in/2010/utility-to-send-commands-or-data-to-other-terminals-ttypts
说些什么吧!