class Rex::Post::Meterpreter::Extensions::Lanattacks::Tftp::Tftp

TFTP Server functionality

Attributes

client[RW]

Public Class Methods

new(client) click to toggle source
# File lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb, line 18
def initialize(client)
  @client = client
end

Public Instance Methods

add_file(filename, data) click to toggle source
# File lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb, line 32
def add_file(filename, data)
  request = Packet.create_request('lanattacks_add_tftp_file')
  request.add_tlv(TLV_TYPE_LANATTACKS_OPTION_NAME, filename)
  request.add_tlv(TLV_TYPE_LANATTACKS_RAW, data, false, true) #compress it
  client.send_request(request)
  true
end
reset() click to toggle source
# File lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb, line 27
def reset
  client.send_request(Packet.create_request('lanattacks_reset_tftp'))
  true
end
start() click to toggle source
# File lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb, line 22
def start
  client.send_request(Packet.create_request('lanattacks_start_tftp'))
  true
end
stop() click to toggle source
# File lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb, line 40
def stop
  client.send_request(Packet.create_request('lanattacks_stop_tftp'))
  true
end