Sha256: f5532100f563c22fbf57259ce32f09f37d25cd07974d72aeaed0f5730e2cc950

Contents?: true

Size: 375 Bytes

Versions: 43

Compression:

Stored size: 375 Bytes

Contents

#!/usr/bin/env ruby

#
# Add a file from memory and save it.
#

msfbase = __FILE__
while File.symlink?(msfbase)
	msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
end
inc = File.dirname(msfbase) + '/../../..'
$:.unshift(inc)

require 'rex/zip'

# example usage
zip = Rex::Zip::Archive.new
zip.add_file("elite.txt", "A" * 1024)
zip.save_to("lolz.zip")

Version data entries

43 entries across 43 versions & 1 rubygems

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