mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-05 14:57:30 +01:00
tagged id / rev - slight mods to editor
git-svn-id: file:///home/svn/framework3/trunk@10005 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
c1a2f51487
commit
d28e1c0d4f
@ -17,7 +17,7 @@ class Plugin::Editor < Msf::Plugin
|
||||
# This class implements a single edit command.
|
||||
#
|
||||
###
|
||||
class ConsoleCommandDispatcher
|
||||
class EditorCommandDispatcher
|
||||
include Msf::Ui::Console::CommandDispatcher
|
||||
|
||||
#
|
||||
@ -37,7 +37,7 @@ class Plugin::Editor < Msf::Plugin
|
||||
end
|
||||
|
||||
#
|
||||
# This method handles the sample command.
|
||||
# This method handles the edit command.
|
||||
#
|
||||
def cmd_edit(*args)
|
||||
print_line ("Launching editor...")
|
||||
@ -53,30 +53,23 @@ class Plugin::Editor < Msf::Plugin
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
def initialize(framework, opts)
|
||||
super
|
||||
|
||||
# console dispatcher commands.
|
||||
add_console_dispatcher(ConsoleCommandDispatcher)
|
||||
add_console_dispatcher(EditorCommandDispatcher)
|
||||
|
||||
print_status("Editor plugin loaded.")
|
||||
end
|
||||
|
||||
#
|
||||
def cleanup
|
||||
# If we had previously registered a console dispatcher with the console,
|
||||
# deregister it now.
|
||||
remove_console_dispatcher('Editor')
|
||||
end
|
||||
|
||||
#
|
||||
#
|
||||
def name
|
||||
"editor"
|
||||
end
|
||||
|
||||
#
|
||||
def desc
|
||||
"Simple Editor Plugin"
|
||||
end
|
||||
|
@ -1,4 +1,6 @@
|
||||
#
|
||||
# $Id$
|
||||
# $Revision$
|
||||
#
|
||||
$:.unshift(File.join(File.expand_path(File.dirname(__FILE__)), '..', 'lib', 'lab'))
|
||||
|
||||
@ -125,8 +127,7 @@ class Plugin::Lab < Msf::Plugin
|
||||
|
||||
def cmd_lab_save(*args)
|
||||
File.open(args[0], 'w') {|f| f.write(@controller.labdef.to_yaml) }
|
||||
hlp_print_targets
|
||||
|
||||
hlp_print_lab
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user