Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-order and Post-order results of executed meterpreter CMD in Python-MSFRPC #7878

Open
alimp5 opened this issue Jan 27, 2017 · 1 comment

Comments

@alimp5
Copy link

alimp5 commented Jan 27, 2017

Hi Metasploit development team,

OS:
Kali Linux

Metasploit Framework Version:
4.13.14-dev (installed via apt-get ...)

ruby-msgpack version:
1.0.0-1

python-msgpack version:
0.4.8-1

I'm using below Lib for interacting with Metasploit:
https://github.com/SpiderLabs/msfrpc/tree/master/python-msfrpc

When I pass a CMD via "session.meterpreter_run_single" to a specific session in python, for the first one, the result is OK. but when I change the CMD and pass to metasploit via RPC, I will get result of previous CMD; So I should run again the above API command to get correct result. :(

Please help me where is the problem and how i can fix this issue??

For reproduce this issue: plz for first time run the sysinfo CMD; for second time run this CMD. for third time, change the name of first CMD to getwd CMD and run the script;;; you will get result of previous CMD instead of new CMD(here: getwd) :(

My python-2.x script:
http://www.4shared.com/file/iOH6LpT9ba/alireza3.html

first time:
first

second time:
first

third time (I passed the getwd CMD, but i received the result of previous CMD) :
third

forth time:
forth

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants