How it works...

The exploit module structure that we just analyzed is Metasploit's way of making things understandable. Consider the def initialize() function. This part helps the module to pick up common exploit definitions. Similarly, register_options() is used by Metasploit to pick up different parameters or assign default parameter values to the exploit module. This is where modular architecture comes in handy. Later in this chapter, we will see how to convert an existing exploit code into a Metasploit module.

Get Metasploit Penetration Testing Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.