2008-09-22 22:32:20 +00:00
|
|
|
require 'fileutils'
|
2008-10-12 03:46:49 +00:00
|
|
|
require 'msf/ui/console/command_dispatcher/db'
|
2008-09-22 22:32:20 +00:00
|
|
|
require 'msf/ui/console/command_dispatcher/wmap'
|
|
|
|
require 'rubygems'
|
|
|
|
require 'sqlite3'
|
|
|
|
|
|
|
|
module Msf
|
|
|
|
|
|
|
|
###
|
|
|
|
#
|
|
|
|
# This class intializes the database db with a shiny new
|
|
|
|
# SQLite3 database instance.
|
|
|
|
#
|
|
|
|
# ET LoWNOISE 08
|
|
|
|
#
|
|
|
|
###
|
|
|
|
|
|
|
|
class Plugin::DBWmap < Msf::Plugin
|
|
|
|
|
|
|
|
#
|
|
|
|
# Command dispatcher for configuring SQLite
|
|
|
|
#
|
|
|
|
class WmapSQLiteCommandDispatcher
|
|
|
|
include Msf::Ui::Console::CommandDispatcher
|
|
|
|
|
|
|
|
#
|
|
|
|
# The dispatcher's name.
|
|
|
|
#
|
|
|
|
def name
|
|
|
|
"Wmap SQLite3 Database"
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# The initial command set
|
|
|
|
#
|
|
|
|
def commands
|
|
|
|
{
|
|
|
|
|
2008-10-12 03:46:49 +00:00
|
|
|
}
|
|
|
|
end
|
2008-09-22 22:32:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# Wrapper class for the database command dispatcher
|
|
|
|
#
|
|
|
|
class WmapDatabaseCommandDispatcher
|
|
|
|
include Msf::Ui::Console::CommandDispatcher
|
|
|
|
include Msf::Ui::Console::CommandDispatcher::Wmap
|
|
|
|
end
|
|
|
|
|
|
|
|
###
|
|
|
|
#
|
|
|
|
# Database specific initialization goes here
|
|
|
|
#
|
|
|
|
###
|
|
|
|
|
|
|
|
def initialize(framework, opts)
|
|
|
|
super
|
2008-10-12 03:46:49 +00:00
|
|
|
|
|
|
|
#add_console_dispatcher(WmapDatabaseCommandDispatcher)
|
|
|
|
|
2008-09-22 22:32:20 +00:00
|
|
|
add_console_dispatcher(WmapSQLiteCommandDispatcher)
|
2008-10-12 03:46:49 +00:00
|
|
|
add_console_dispatcher(WmapDatabaseCommandDispatcher)
|
2008-09-22 22:32:20 +00:00
|
|
|
|
2008-11-12 05:21:45 +00:00
|
|
|
print_status("=[ WMAP v0.3 - ET LoWNOISE")
|
2008-09-22 22:32:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def cleanup
|
|
|
|
remove_console_dispatcher('Wmap SQLite3 Database')
|
|
|
|
remove_console_dispatcher('Wmap Database Backend')
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# This method returns a short, friendly name for the plugin.
|
|
|
|
#
|
|
|
|
def name
|
2008-10-12 03:46:49 +00:00
|
|
|
"db_wmap"
|
2008-09-22 22:32:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# This method returns a brief description of the plugin. It should be no
|
|
|
|
# more than 60 characters, but there are no hard limits.
|
|
|
|
#
|
|
|
|
def desc
|
|
|
|
"Loads a new sqlite3 wmap database backend"
|
|
|
|
end
|
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
end
|
2008-10-19 21:03:39 +00:00
|
|
|
end
|