c210260845
[#46491831] Comments at the start of the file with ## caused YARD to think the comment was documenting the require call. By removing the ##, the warning disappeared. I did not determine what is special about ## in file comments.
39 lines
549 B
Ruby
39 lines
549 B
Ruby
# -*- coding: binary -*-
|
|
# $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
|
|
|