docs/metasploit-framework.wiki/Writing-External-GoLang-Modules.md
Contributing modules in GO can be achieved in a few simple steps as outlined below. As for supported GO version, we have tested with 1.11.2, no promised for version 2.
info -d//usr/bin/env go run "$0" "$@"; exit "$?"import "metasploit/module"
func main() {
metadata := &module.Metadata{
Name: "<module name>",
Description: "<describe>",
Authors: []string{"<author 1>", "<author 2>"},
Date: "<date module written>",
Type:"<module type>",
Privileged: <true|false>,
References: []module.Reference{},
Options: map[string]module.Option{
"<option 1>": {Type: "<type>", Description: "<description>", Required: <true|false>, Default: "<default>"},
"<option 2>": {Type: "<type>", Description: "<description>", Required: <true|false>, Default: "<default>"},
}}
module.Init(metadata, <the entry method to your module>)
}
Note: Above does not outline the full potential list of metadata options
Currently supported module types:
shared/src/ metasploit will automatically add these to the GOPATH