1

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.

2 Answers 2

3

pexpect may be useful: http://pypi.python.org/pypi/pexpect/2.4

Sign up to request clarification or add additional context in comments.

2 Comments

That looks more like what I was looking for. Thanks ;-)
By the name, i can see that pexpect is expect for python. Thank you.
0

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, e.g 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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.