mailing list archives
Re: Module Development
From: Jonathan Cran <jcran () 0x0e org>
Date: Tue, 25 May 2010 11:05:37 -0500
On Tue, May 25, 2010 at 10:24 AM, Joshua J. Drake <jdrake () metasploit com>wrote:
On Tue, May 25, 2010 at 08:24:11AM -0500, HD Moore wrote:
You can reload and rerun the module by typing "rerun" from msfconsole,
this is the normal way to do module development. Before typing rerun,
enter "save", so that your configuration is preserved across restarts.
For times when you do need to exit msf (like changing stuff in lib/),
resource scripts are invaluable.
$ msfconsole -r whatever.msfrc
And since you don't have to leave the console for module development, jduck
& I threw together a quick plugin to make it easy to edit the current module
in the console. You can find it here: http://www.0x0e.org/x/msf/editor.rb
To use it, simply drop it in the msf plugins directory, and load it with:
msf> load editor
[*] Editor plugin loaded.
[*] Successfully loaded plugin: editor
Then use a particular module:
msf> use windows/smb/psexec
then, just type edit and it'll drop you to an editor with that module
msf exploit(psexec) > edit
note that it will use the $EDITOR env variable to launch the editor, but
will fall back to 'vi' if you don't have the variable set.
Hope it helps!
jcran () 0x0e org