SSH下的挑战:最小化命令环境下如何得到更多的工具?
Posted | archive
今天帮某公司测试VoIP产品,有个服务器可以SSH连接上去,比较哀求的是:这个帐号权限很低,命令很有限,只支持这几个:
! .mount ]] command else for kill readonly then until
./ .mv alias compgen enable function let reboot time wait
.arp .netconfig asterisk complete esac getopts local return times while
.cat .netstat bash continue eval hash logout select trap {
.cut .rm bg declare exec help ls set true }
.dir .sed bind dirs exit history ping shift type
.echo .umount break disown export if popd shopt typeset
.grep .vars builtin do false ifconfig printf source ulimit
.ip : caller done fc in pushd suspend umask
.kosh [ case echo fg ip pwd tail unalias
.more [[ cd elif fi jobs read test unset
这里我需要一个命令 free 和 top,但是主机似乎并不提供。
我想到,用Base64之类的编码手段把二进制bin做成文本流,然后在SSH里复制粘贴,写一个shell脚本还原这个bin。在Win32 CMD下有zzzEVAzzz大侠写了一个any2bat.vbs,作用是把任意文件(包括exe)转换成一个批处理,这个批处理调用debug.exe会把文件还原。现在我在思考:Linux下有没有这么好的事情?
Comments