Home page logo
/

metasploit logo Metasploit mailing list archives

Re: Module Development
From: "Vitor Moreira" <vjsmoreira () gmail com>
Date: Tue, 25 May 2010 17:14:01 +0100

Thanks Jonathan,

This one will save me a lot of time. Simply brilliant.

Vitor

From: Jonathan Cran
Sent: Tuesday, May 25, 2010 5:05 PM
To: Joshua J. Drake ; vjsmoreira () gmail com
Cc: HD Moore ; framework () spool metasploit com
Subject: Re: [framework] Module Development


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:

[snip]
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 loaded:


msf exploit(psexec) > edit
Launching editor...


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





--
Jonathan Cran
jcran () 0x0e org
515.890.0070
_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]