metasploit-framework/lib/rex/zip/samples/mkzip.rb

13 lines
180 B
Ruby
Executable File

#!/usr/bin/env ruby
#
# Add a file from memory and save it.
#
require 'zip'
# example usage
zip = Zip::Archive.new
zip.add_file("elite.txt", "A" * 1024)
zip.save_to("lolz.zip")