docs/metasploit-framework.wiki/Module-Documentation.md
You can now generate documentation for modules on the fly using the info -d command.
Module documentation allows you to see the help for a particular module from a web page, instead of from the command line.
The help page includes:
After you load a module, you can type info -d to generate a help page that provides basic usage information and displays the PR history for the module.
msf> use auxiliary/scanner/smb/smb_login
msf (smb_login)> info -d
Additionally, if it's available, the help page will also include a KB that contains advanced usage information, such as vulnerable target details, caveats, and sample usage. The content in the KB is contained in a markdown file in the metasploit-framework/documentation/modules directory. Its purpose is to provide supplemental information that is outside of the scope of general documentation.
In order for you to be able to view the PR history for a module, you'll need add your GitHub access token to the environment variable GITHUB_OAUTH_TOKEN="<your token here>" in .bash_profile.
To generate a GitHub access token, check out this page. The token will need to have a scope for repos.
Generally, the person who creates the module will write the initial KB for it, but anyone can write or contribute to it.
Before you write a KB, you should take a look at the sample template, module_doc_template.md, or take a look at any of the KBs that are already available.
To write a KB, you'll need to:
ms08_067_netapi.rb is called ms08_067_netapi.md.metasploit-framework/documentation/modules directory as directed below.If you go to metasploit-framework/documentation/modules, you'll see that there are documentation directories for each module type: auxiliary, exploit, payload, and post. To figure out where you need to put the file, you'll need to look at the module name.
use <module name>.info.For example:
msf> use auxiliary/scanner/smb/smb_login
msf (smb_login)> info
Name: SMB Login Check Scanner
Module: auxiliary/scanner/smb/smb_login
....
If you were creating a KB for the smb login scanner, you'd add it to metasploit-framework/documentation/modules/auxiliary/scanner/smb.
These are just suggestions, but it'd be nice if the KB had these sections: