How to emulate user on terminal (without bash scripts)
Hello there,
My idea is use something like
echo "ls" > tty2
and this command should work. But my idea is to use in other enviroments than bash.
My idea is to make scripts to automate tasks AS:
typing some commands on a FTP terminal for example.
I wanna do some scripts, but not to run in bash enviroment, but to inject the commands via a bash or perl script.
what i get with this is only
echo "ls" > tty2
<on tty2>ls
but this doesn't work as typed text, there is some way to do it?
there is some way to emulate one user typing something in a terminal and pressing enter???
I know that if were from one user to another could be a security hole, but from one to the same user i don't see why not.
sorry for the confusion, but it can save my life with a software that isn't well done.
|