简体   繁体   中英

Send commands to an interactive shell from Python

Is there a way to send command to another interactive shell ? Let's take the example of the meterpreter shell used in metasploit. Could it be a way to say command to this shell from python code, as soon as I get control of a computer and have a meterpreter shell to play with ?

I mean All this from python code.

pexpect可能有用: http ://pypi.python.org/pypi/pexpect/2.4

It will not be easy at all.

You will have to know if meterpreter has any means for other programs to communicate with it.

If it doesn't, you might want to go through hacking through it, eg using OS pipes, etc to be able to get it to work.

In any case, the code needed for such communication might be beyond Python's power.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM