Files
metasploit-gs/lib/msf/core/exploit/dhcp.rb
T
HD Moore 9ce47c01bd Reverting the autoload changes until we can upgrade to a new ActiveSupport library or find a workaround
git-svn-id: file:///home/svn/framework3/trunk@12600 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-12 20:03:55 +00:00

40 lines
530 B
Ruby

##
# $Id$
##
require 'rex/proto/dhcp'
module Msf
###
#
# This mixin provides a DHCPServer
#
###
module Exploit::DHCPServer
def initialize(info = {})
super
@dhcp = nil
end
def start_service(hash = {}, context = {})
@dhcp = Rex::Proto::DHCP::Server.new(hash, context)
print_status("Starting DHCP server") if datastore['VERBOSE']
@dhcp.start
add_socket(@dhcp.socket)
@dhcp
end
def stop_service
print_status("Stopping DHCP server") if datastore['VERBOSE']
@dhcp.stop
end
attr_accessor :dhcp
end
end