Sha256: 21172746715a5cf3fcdbcc31f5194bc726d7560fa62937ad53cd8b1b8c6028e7
Contents?: true
Size: 812 Bytes
Versions: 2
Compression:
Stored size: 812 Bytes
Contents
#!/usr/bin/env ruby # -*- coding: binary -*- # # Create a zip file with comments! # 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, nil, %Q< +---------------+ | file comment! | +---------------+ >) zip.set_comment(%Q< +------------------------------------------+ | | | Hello! This is the Zip Archive comment! | | | +------------------------------------------+ >) zip.save_to("lolz.zip")
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
librex-0.0.68 | lib/rex/zip/samples/comment.rb |
librex-0.0.66 | lib/rex/zip/samples/comment.rb |