Skip to content

Cannot exit normally after creating MsfRpcConsole #35

@ronnie88597

Description

@ronnie88597

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                ]
  • -- --=[ 2052 exploits - 1109 auxiliary - 346 post ]
  • -- --=[ 562 payloads - 45 encoders - 10 nops ]
  • -- --=[ 7 evasion ]

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions