Sha256: 27cac09dea861d703e5b4f81a9f473307f1b1474c8817eaa68218fdfc6c8363c

Contents?: true

Size: 920 Bytes

Versions: 15

Compression:

Stored size: 920 Bytes

Contents

# -*- coding: binary -*-

require 'rex/post/meterpreter/extensions/lanattacks/tlv'

module Rex
module Post
module Meterpreter
module Extensions
module Lanattacks
module Tftp

###
#
# TFTP Server functionality
#
###
class Tftp

  def initialize(client)
    @client = client
  end

  def start
    client.send_request(Packet.create_request('lanattacks_start_tftp'))
    true
  end

  def reset
    client.send_request(Packet.create_request('lanattacks_reset_tftp'))
    true
  end

  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

  def stop
    client.send_request(Packet.create_request('lanattacks_stop_tftp'))
    true
  end

  attr_accessor :client
end

end; end; end; end; end; end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
rex-2.0.13 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
rex-2.0.12 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
rex-2.0.11 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
rex-2.0.10 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
rex-2.0.9 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
rex-2.0.8 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
rex-2.0.7 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
rex-2.0.5 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
rex-2.0.4 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
dstruct-0.0.1 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
rex-2.0.3 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
librex-0.0.999 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
rex-2.0.2 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
librex-0.0.71 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb
librex-0.0.70 lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb