allfro / pymetasploit

A full-fledged msfrpc library for Metasploit framework.
298 stars 141 forks source link

Cannot exit normally after creating MsfRpcConsole #35

Open ronnie88597 opened 3 years ago

ronnie88597 commented 3 years ago

Description:

Cannot exit normally after creating MsfRpcConsole

Test script:

from pymetasploit3.msfrpc import MsfRpcClient from pymetasploit3.msfconsole import MsfRpcConsole client = MsfRpcClient("123456", port=55553) console = MsfRpcConsole(client, cb=None)

Expected result:

exit normally

Actual result:

Cannot exit normally, never stops running!

$ python3 Python 3.6.9 (default, Oct 8 2020, 12:12:24) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.

from pymetasploit3.msfrpc import MsfRpcClient from pymetasploit3.msfconsole import MsfRpcConsole client = MsfRpcClient("123456", port=55553) console = MsfRpcConsole(client, cb=None) / \ /\ _ _ // | |\ / | __ \ \ _ | | / \ \ \ | | \/| | | \ |- -| /\ / \ | -/ | || | || | |- -| || | | | |_ | | / -\ \ \ | | | | _/| | | | |/ |_/ \\/ /\ \/ \/ _| |\ \\

   =[ metasploit v6.0.1-dev-1663bf3184                ]

Metasploit tip: Metasploit can be configured at startup, see msfconsole --help to learn more

exit() ^CException ignored in: <module 'threading' from '/usr/lib/python3.6/threading.py'> Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 1294, in _shutdown t.join() File "/usr/lib/python3.6/threading.py", line 1056, in join self._wait_for_tstate_lock() File "/usr/lib/python3.6/threading.py", line 1072, in _wait_for_tstate_lock elif lock.acquire(block, timeout): KeyboardInterrupt

4rr0w commented 1 year ago

Hi, did you found any solution for this?