Parent

Methods

Class/Module Index [+]

Quicksearch

Rex::Zip::CentralDir

This structure holds all of the information about a particular Zip Entry as it is contained within the central directory.

Constants

SIGNATURE

Public Class Methods

new(entry, offset) click to toggle source
# File lib/rex/zip/blocks.rb, line 112
def initialize(entry, offset)
        @entry = entry
        @disknum_start = 0
        @attr_int = 0
        @attr_ext = 0x20
        @hdr_offset = offset
end

Public Instance Methods

pack() click to toggle source
# File lib/rex/zip/blocks.rb, line 120
def pack
        path = @entry.relative_path

        ret = [ SIGNATURE, ZIP_VERSION ].pack('Vv')
        ret << [ ZIP_VERSION ].pack('v')
        ret << @entry.flags.pack
        ret << @entry.info.pack
        arr = []
        arr << path.length
        arr << @entry.xtra.length
        arr << @entry.comment.length
        arr << @disknum_start
        arr << @attr_int
        arr << @entry.attrs
        arr << @hdr_offset
        ret << arr.pack('vvvvvVV')
        ret << path
        ret << @entry.xtra
        ret << @entry.comment
        # digital signature not supported
        ret
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.