Mixins and Plugins
A Quick Diversion into Ruby
Every Class only has one parent.
A class may include many Modules.
Modules can add new methods.
Modules can overload old methods.
Metasploit modules inherit Msf::Module and include mixins to add features.
Metasploit Mixins
Mixins include one class into another (Inclusion). This is different to inheritance.
Mixins can override a class’ methods and change behavior.
Mixins can add new features and allows modules to have different ‘flavors’.
Metasploit Plugins
Plugins work directly with the API.
Plugins hook into the event subsystem.
They automate specific tasks that would be tedious to do manually.
Plugins only work in the msfconsole.
Plugins can add new console commands and extend the overall Framework functionality.
References
Last updated