1

I've added an exploit from www.exploit-db.com to /.msf4/modules/exploit/windows/remote/41987.py following the naming convention. I updated the database with the command updatedb and rebooted.

Metasploit does not detect the newly added exploit. However, if i add 41891.rb, it detects it no problem. Why does Metasploit not see the python files?

Tom Aranda
  • 5,919
  • 11
  • 35
  • 51

4 Answers4

2

I had the same problem.

Metasploit has feature to import python modules but it cannot work with any random python script, that script needs a structure to be working in Metasploit.

You will get a detailed view in this answer. A very informative one.

https://security.stackexchange.com/questions/196730/metasploit-is-not-detecting-newly-imported-python-exploit

Hope it helps.

Ratnadeep
  • 1,125
  • 1
  • 15
  • 30
0

Because metasploit is purely written in Ruby.

Wir3GhOst
  • 1
  • 1
0

DO as follow to add python extension (if you havent done yet): - meterpreter > use python - try python_import to import your python code module

Enkidu M
  • 1
  • 3
0

I wrote a little script a few months to fix import a custom module to metasploit. Here's the link https://github.com/donovandevs/fixs
It was impossible reload or update the msf exploits after import a custom module. And it gives me a huge random error related with the stack, but that wasn't possible.

cigien
  • 57,834
  • 11
  • 73
  • 112
  • 1
    Please don't vandalize your posts. By posting on the Stack Exchange network, you've granted a non-revocable right, under the [CC BY-SA 4.0 license](https://creativecommons.org/licenses/by-sa/4.0/), for Stack Exchange to distribute that content (i.e. regardless of your future choices). By Stack Exchange policy, the non-vandalized version of the post is the one which is distributed, and thus, any vandalism will be reverted. If you want to know more about deleting a post please see: [How does deleting work?](https://stackoverflow.com/help/what-to-do-instead-of-deleting-question) – cigien Jan 29 '21 at 04:04