lgoldstein
Thank you for your soonest reply.
I sure the Shell Channel is I needed. I think the dangerous command
embed in the script is accectble in my case. The method your recommanded
Intercept the STDIN was I considered, my implement is as follow:
I implements the class ChannelDataReceiver and override its member
function
public int data(ChannelSession channel, byte[] buf, int start,
int len)
and then intercept the bytes in the buf.
But I found the Arrow keys (↑ ↓) is diffcult to treat. When I input
"↑", it means the lastest input in history commands(e.g "pwd") will execute
in remote host,but I only catched the char "↑" by intercepting the STDIN.
Dear lgodstein, so how to treat the arrow keys or any other more
effective method could audit the commands
Best Regards
Bruce (行水)
--
Sent from:
http://apache-mina.10907.n7.nabble.com/Apache-MINA-Developer-Forum-f6809.html