Let's work with a simple module that we used previously, that is, the HTTP version scanner and see how it works. The path to this Metasploit module is /modules/auxiliary/scanner/http/http_version.rb
.
Let's examine this module systematically:
# This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # website for more information on licensing and terms of use. # http://metasploit.com/ require 'rex/proto/http' require 'msf/core' class Metasploit3 < Msf::Auxiliary
Let's discuss how things are arranged here. The copyright lines starting with the #
symbol are the comments and they are included in all Metasploit modules. The required 'rex/proto/http'
statement asks the interpreter to include a path to all the HTTP protocol methods from the rex
library. Therefore, the path to all the files from the /lib/rex/proto/http
directory is now available to the module...