Class: Rex::Zip::LocalFileHdr
- Inherits:
-
Object
- Object
- Rex::Zip::LocalFileHdr
- Defined in:
- lib/rex/zip/blocks.rb
Overview
This structure records the compression data and flags about a Zip entry to a file.
Constant Summary collapse
- SIGNATURE =
0x4034b50
Instance Method Summary collapse
-
#initialize(entry) ⇒ LocalFileHdr
constructor
A new instance of LocalFileHdr.
- #pack ⇒ Object
Constructor Details
#initialize(entry) ⇒ LocalFileHdr
Returns a new instance of LocalFileHdr.
83 84 85 |
# File 'lib/rex/zip/blocks.rb', line 83 def initialize(entry) @entry = entry end |
Instance Method Details
#pack ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/rex/zip/blocks.rb', line 87 def pack path = @entry.relative_path ret = [ SIGNATURE, ZIP_VERSION ].pack('Vv') ret << @entry.flags.pack ret << @entry.info.pack ret << [ path.length, @entry.xtra.length ].pack('vv') ret << path ret << @entry.xtra ret end |