b1c4fd3f39
Msf::Modules::Loader::Directory#each_module_reference_name created two Pathname objects per module file and called relative_path_from to derive the module reference name. With ~5,000 module files this produced ~170,000 calls to Pathname#chop_basename internally. Since Rex::Find.find always yields absolute paths rooted at full_entry_path, simple String#delete_prefix achieves the same result without allocating Pathname objects.
This is where all of the libraries and mixins of Metasploit live. Generally speaking any code that will be reused across multiple modules will be placed into a library or mixin which will then be placed under this folder.