Get the Whitepaper called Metasplizing – Converting an Existing Exploit to a MSF Module.
You can download it from the following link: https://packetstormsecurity.com/files/download/90086/Metasplizing.pdf
Source: https://packetstormsecurity.com/files/90086/Metasplizing-Converting-Existing-Exploits-To-MSF-Modules.html

