I am trying to run vulnerability testing for a class and the first line of code in the script is:
from metasploit.msfrpc import MsfRpcClient
However, when I try to run the program, I get "ModuleNotFoundError: No Module named 'metasploit'"
I am running on Kali Linux; metasploit comes standard, but either I am doing something wrong or am missing a module. Has anyone run into this and can maybe suggest a resolution?
first, pip3 install --user pymetasploit3 $ msfrpcd -P yourpassword -S
and then in python,
from pymetasploit3.msfrpc import MsfRpcClient
It can work. Good luck.