Files
metasploit-gs/lib/msf/core/exploit/dhcp.rb
T
Tab Assassin 7e5e0f7fc8 Retab lib
2013-08-30 16:28:33 -05:00

38 lines
567 B
Ruby

# -*- coding: binary -*-
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