Skip to content

Commit 74e0256

Browse files
author
Brent Cook
committed
Revert "remove leftover cruft"
This reverts commit 2be551c.
1 parent f316607 commit 74e0256

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed

lib/rex/registry.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# -*- coding: binary -*-
2+
require 'rex/registry/hive'
3+
require 'rex/registry/regf'
4+
require 'rex/registry/nodekey'
5+
require 'rex/registry/lfkey'
6+
require 'rex/registry/valuekey'
7+
require 'rex/registry/valuelist'
8+
9+
module Rex
10+
module Registry
11+
12+
attr_accessor :alias
13+
end
14+
end

lib/rex/zip.rb

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# -*- coding: binary -*-
2+
#
3+
# Zip library
4+
#
5+
# Written by Joshua J. Drake <jduck [at] metasploit.com>
6+
#
7+
# Based on code contributed by bannedit, and the following SPEC:
8+
# Reference: http://www.pkware.com/documents/casestudies/APPNOTE.TXT
9+
#
10+
11+
require 'zlib'
12+
13+
module Rex
14+
module Zip
15+
16+
ZIP_VERSION = 0x14
17+
18+
# general purpose bit flag values
19+
#
20+
# bit 0
21+
GPBF_ENCRYPTED = 0x0001
22+
# bits 1 & 2
23+
# implode only
24+
GPBF_IMP_8KDICT = 0x0002
25+
GPBF_IMP_3SFT = 0x0004
26+
# deflate only
27+
GPBF_DEF_MAX = 0x0002
28+
GPBF_DEF_FAST = 0x0004
29+
GPBF_DEF_SUPERFAST = 0x0006
30+
# lzma only
31+
GPBF_LZMA_EOSUSED = 0x0002
32+
# bit 3
33+
GPBF_USE_DATADESC = 0x0008
34+
# bit 4
35+
GPBF_DEF_ENHANCED = 0x0010
36+
# bit 5
37+
GPBF_COMP_PATHCED = 0x0020
38+
# bit 6
39+
GPBF_STRONG_ENC = 0x0040
40+
# bit 7-10 unused
41+
# bit 11
42+
GPBF_STRS_UTF8 = 0x0800
43+
# bit 12 (reserved)
44+
# bit 13
45+
GPBF_DIR_ENCRYPTED = 0x2000
46+
# bit 14,15 (reserved)
47+
48+
49+
# compression methods
50+
CM_STORE = 0
51+
CM_SHRINK = 1
52+
CM_REDUCE1 = 2
53+
CM_REDUCE2 = 3
54+
CM_REDUCE3 = 4
55+
CM_REDUCE4 = 5
56+
CM_IMPLODE = 6
57+
CM_TOKENIZE = 7
58+
CM_DEFLATE = 8
59+
CM_DEFLATE64 = 9
60+
CM_PKWARE_IMPLODE = 10
61+
# 11 - reserved
62+
CM_BZIP2 = 12
63+
# 13 - reserved
64+
CM_LZMA_EFS = 14
65+
# 15-17 reserved
66+
CM_IBM_TERSE = 18
67+
CM_IBM_LZ77 = 19
68+
# 20-96 reserved
69+
CM_WAVPACK = 97
70+
CM_PPMD_V1R1 = 98
71+
72+
73+
# internal file attributes
74+
IFA_ASCII = 0x0001
75+
# bits 2 & 3 are reserved
76+
IFA_MAINFRAME_MODE = 0x0002 # ??
77+
78+
79+
# external file attributes
80+
EFA_ISDIR = 0x0001
81+
82+
83+
# various parts of the structure
84+
require 'rex/zip/blocks'
85+
86+
# an entry in a zip file
87+
require 'rex/zip/entry'
88+
89+
# the archive class
90+
require 'rex/zip/archive'
91+
92+
# a child of Archive, implements Java ARchives for creating java applications
93+
require 'rex/zip/jar'
94+
95+
end
96+
end

0 commit comments

Comments
 (0)