Sha256: efcec80200484aa023754260b346ecec31bfdcc00efe0d4c248d2edd9b755c94

Contents?: true

Size: 1.69 KB

Versions: 20

Compression:

Stored size: 1.69 KB

Contents

#!/usr/bin/env ruby
#
# Zip library
#
# Written by Joshua J. Drake <jduck [at] metasploit.com>
#
# Based on code contributed by bannedit, and the following SPEC:
# Reference: http://www.pkware.com/documents/casestudies/APPNOTE.TXT
#

require 'zlib'

module Rex
module Zip

ZIP_VERSION = 0x14

# general purpose bit flag values
#
# bit 0
GPBF_ENCRYPTED      = 0x0001
# bits 1 & 2
# implode only
GPBF_IMP_8KDICT     = 0x0002
GPBF_IMP_3SFT       = 0x0004
# deflate only
GPBF_DEF_MAX        = 0x0002
GPBF_DEF_FAST       = 0x0004
GPBF_DEF_SUPERFAST  = 0x0006
# lzma only
GPBF_LZMA_EOSUSED   = 0x0002
# bit 3
GPBF_USE_DATADESC   = 0x0008
# bit 4
GPBF_DEF_ENHANCED   = 0x0010
# bit 5
GPBF_COMP_PATHCED   = 0x0020
# bit 6
GPBF_STRONG_ENC     = 0x0040
# bit 7-10 unused
# bit 11
GPBF_STRS_UTF8      = 0x0800
# bit 12 (reserved)
# bit 13
GPBF_DIR_ENCRYPTED  = 0x2000
# bit 14,15 (reserved)


# compression methods
CM_STORE            = 0
CM_SHRINK           = 1
CM_REDUCE1          = 2
CM_REDUCE2          = 3
CM_REDUCE3          = 4
CM_REDUCE4          = 5
CM_IMPLODE          = 6
CM_TOKENIZE         = 7
CM_DEFLATE          = 8
CM_DEFLATE64        = 9
CM_PKWARE_IMPLODE   = 10
# 11 - reserved
CM_BZIP2            = 12
# 13 - reserved
CM_LZMA_EFS         = 14
# 15-17 reserved
CM_IBM_TERSE        = 18
CM_IBM_LZ77         = 19
# 20-96 reserved
CM_WAVPACK          = 97
CM_PPMD_V1R1        = 98


# internal file attributes
IFA_ASCII           = 0x0001
# bits 2 & 3 are reserved
IFA_MAINFRAME_MODE  = 0x0002 # ??


# external file attributes
EFA_ISDIR           = 0x0001


# various parts of the structure
require 'rex/zip/blocks'

# an entry in a zip file
require 'rex/zip/entry'

# the archive class
require 'rex/zip/archive'

end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
librex-0.0.32 lib/rex/zip.rb
librex-0.0.31 lib/rex/zip.rb
librex-0.0.30 lib/rex/zip.rb
librex-0.0.29 lib/rex/zip.rb
librex-0.0.28 lib/rex/zip.rb
librex-0.0.27 lib/rex/zip.rb
librex-0.0.26 lib/rex/zip.rb
librex-0.0.25 lib/rex/zip.rb
librex-0.0.23 lib/rex/zip.rb
librex-0.0.21 lib/rex/zip.rb
librex-0.0.19 lib/rex/zip.rb
librex-0.0.17 lib/rex/zip.rb
librex-0.0.13 lib/rex/zip.rb
librex-0.0.12 lib/rex/zip.rb
librex-0.0.7 lib/rex/zip.rb
librex-0.0.6 lib/rex/zip.rb
librex-0.0.5 lib/rex/zip.rb
librex-0.0.4 lib/rex/zip.rb
librex-0.0.3 lib/rex/zip.rb
librex-0.0.1 lib/rex/zip.rb