Sha256: 97c05c740f46538ae7e4ada74a3cfac6144b0298c8a88dcdb13c15170a8264e1

Contents?: true

Size: 455 Bytes

Versions: 42

Compression:

Stored size: 455 Bytes

Contents

#!/usr/bin/env ruby
#
# $Revision: 9333 $
#
# $Id: server.rb.ut.rb 9333 2010-05-21 00:03:04Z jduck $
#

require 'rex/compat'
require 'rex/proto/tftp'

content = nil

fn = ARGV.shift
if (fn and fn.length > 0)
	File.open(fn, "rb") do |fd|
		content = fd.read(fd.stat.size)
	end
end

content ||= "A" * (1024*1024)


tftp = Rex::Proto::TFTP::Server.new
tftp.register_file("poo", content)
tftp.start

#loop { break if not tftp.thread.alive? }
tftp.thread.join

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
librex-0.0.65 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.63 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.54 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.53 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.52 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.51 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.50 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.49 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.48 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.47 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.46 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.44 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.43 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.42 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.41 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.40 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.39 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.38 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.37 lib/rex/proto/tftp/server.rb.ut.rb
librex-0.0.36 lib/rex/proto/tftp/server.rb.ut.rb