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
589 B
Ruby
39 lines
589 B
Ruby
# -*- coding: binary -*-
|
|
# $Id$
|
|
|
|
require 'rex/proto/tftp'
|
|
|
|
module Msf
|
|
|
|
###
|
|
#
|
|
# This mixin provides a TFTPServer
|
|
#
|
|
###
|
|
module Exploit::TFTPServer
|
|
|
|
def initialize(info = {})
|
|
super
|
|
|
|
@tftp = nil
|
|
end
|
|
|
|
def start_service(tag, exe)
|
|
@tftp = Rex::Proto::TFTP::Server.new
|
|
@tftp.register_file(tag, exe)
|
|
print_status("Starting TFTP server to host \"#{tag}\" (#{exe.length} bytes)") if datastore['VERBOSE']
|
|
@tftp.start
|
|
add_socket(@tftp.sock)
|
|
@tftp
|
|
end
|
|
|
|
def stop_service
|
|
print_status("Stopping TFTP server") if datastore['VERBOSE']
|
|
@tftp.stop
|
|
end
|
|
|
|
attr_accessor :tftp
|
|
end
|
|
|
|
end
|