Metasploit - Failed to load module

Hello,
Impossible to load a new module into metasploit.
Trying to exploit “Kioptrix Level 3”.
I have download a metasploit module https://www.exploit-db.com/exploits/15964 here.
I have put the file in different location:
/usr/share/metasploit-framework/modules/exploits/linux/lotus
and
/root/.msf4/modules/exploits/linux/lotus.
I’ve run the “updatedb” command in cmd prompt and in msfconsole.
I’ve run “loadpath /usr/share/metasploit-framework/modules/” (with several different path).
Then:
msf5 > use exploit/linux/locus/Lotus3.0_Remote_Command_Exec
[-] No results from search
[-] Failed to load module: exploit/linux/locus/Lotus3.0_Remote_Command_Exec
Found nothing valuable and up to date on internet to fix the problem.
Yes the same module is already present on metasploit (lcms_php-exec) but I want to be able to load my own module anyway.
Any help?
Thanks.

Env:

  • Linux kali 5.6.0-kali2-amd64 #1 SMP Debian 5.6.14-2kali1 (2020-06-10) x86_64 GNU/Linux
  • metasploit v5.0.94-dev

Hi @Maltroc, Metasploit does have an option to import Python modules, but not every python file is compatible with it. The python file should be written in a certain structure so that it can talk to Metasploit. This particular python file is not compatible with it. If you want to know how the file should be written to be compatible with Metasploit then look at this link https://github.com/rapid7/metasploit-framework/wiki/Writing-External-Python-Modules

Hello @Apurv-StationX,

Thanks a lot for your quick answer.
Actually I am sorry I wrote the wrong link in my post.
I’ve used the right ruby metasploitable module :
https://www.exploit-db.com/exploits/18565

However, I have found what might be the problem.
Before, I had renamed the original file (18565.rb) in Lotus3.0_Remote_Command_Exec.rb.
Now I have just downloaded the file again and did not renamed it (it stayed 18565.rb) and it is now included in Metasploit normally. And I can run it.

Thanks.

Oh, got it. I am glad it worked out.