Parent

Methods

Class/Module Index [+]

Quicksearch

Rex::Zip::CentralDirEnd

This structure is written after the per-entry central directory records to provide information about the archive as a whole.

Constants

SIGNATURE

Public Class Methods

new(ncfd, cfdsz, offset, comment=nil) click to toggle source
# File lib/rex/zip/blocks.rb, line 154
def initialize(ncfd, cfdsz, offset, comment=nil)
        @disk_no = 0
        @disk_dir_start = 0
        @ncfd_this_disk = ncfd
        @ncfd_total = ncfd
        @cfd_size = cfdsz
        @start_offset = offset
        @comment = comment
        @comment ||= ''
end

Public Instance Methods

pack() click to toggle source
# File lib/rex/zip/blocks.rb, line 166
def pack
        arr = []
        arr << SIGNATURE
        arr << @disk_no
        arr << @disk_dir_start
        arr << @ncfd_this_disk
        arr << @ncfd_total
        arr << @cfd_size
        arr << @start_offset
        arr << @comment.length
        (arr.pack('VvvvvVVv') + @comment)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.