Analyzing an existing module
Now that we have built some background about module building in our previous recipe, our next step will be to analyze existing modules. It is highly recommended that you should look at the scripts of existing modules if you have to learn and dive deeper into module and platform development.
Getting ready
We will analyze a simple ftp module here in order to dive deeper into module building.
We will proceed from where we left off in the previous recipe. We have already discussed the basic template of the module in the previous recipe so here we will start from the main body of the script.
How to do it...
We will be analyzing the ftp anonymous access module. You can find the main script at the following location: pentest/exploits/framework3/modules/auxiliary/scanner/ftp/anonymous.rb
Here is the complete script for your reference:
class Metasploit3 < Msf::Auxiliary include Msf::Exploit::Remote::Ftp include Msf::Auxiliary::Scanner include Msf::Auxiliary::Report...