xaba 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +32 -26
- data/exe/xaba +1 -1
- data/lib/xaba/cli.rb +7 -2
- data/lib/xaba/container.rb +7 -2
- data/lib/xaba/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9df8a823fee400fe703057e64d921db3b5e7c52c7233761892a175c05a93c22e
|
4
|
+
data.tar.gz: d1a03cc98cdd036672f17b896a8727e0a91a9f4d55dd68a3a4b1f841a84963af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 776708e3436e8c48e27ca1397265bf6f0b4dc829bd49c62d18e966325b40a237fcd10e6e090eba55a18e85459acb8a0838a3fc67375087f708c8ffacea59ac2a
|
7
|
+
data.tar.gz: 23b0c9b7ffbf222be6b27932ddf068548482b3f54f0311528835f3c21ad65e0acef4771dbc824dacb0346e1bd7694b9f9e1b16847780c353639b70cd1f6e19bb
|
data/Gemfile.lock
CHANGED
@@ -10,34 +10,35 @@ GEM
|
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
12
|
ast (2.4.2)
|
13
|
-
diff-lcs (1.5.
|
13
|
+
diff-lcs (1.5.1)
|
14
14
|
extlz4 (0.3.4)
|
15
15
|
iostruct (0.0.5)
|
16
|
-
json (2.7.
|
16
|
+
json (2.7.2)
|
17
17
|
language_server-protocol (3.17.0.3)
|
18
|
-
parallel (1.
|
19
|
-
parser (3.3.0
|
18
|
+
parallel (1.25.1)
|
19
|
+
parser (3.3.2.0)
|
20
20
|
ast (~> 2.4.1)
|
21
21
|
racc
|
22
|
-
racc (1.
|
22
|
+
racc (1.8.0)
|
23
23
|
rainbow (3.1.1)
|
24
|
-
rake (13.1
|
25
|
-
regexp_parser (2.9.
|
26
|
-
rexml (3.
|
27
|
-
|
28
|
-
|
29
|
-
rspec-
|
30
|
-
rspec-
|
31
|
-
|
32
|
-
|
33
|
-
|
24
|
+
rake (13.2.1)
|
25
|
+
regexp_parser (2.9.2)
|
26
|
+
rexml (3.3.0)
|
27
|
+
strscan
|
28
|
+
rspec (3.13.0)
|
29
|
+
rspec-core (~> 3.13.0)
|
30
|
+
rspec-expectations (~> 3.13.0)
|
31
|
+
rspec-mocks (~> 3.13.0)
|
32
|
+
rspec-core (3.13.0)
|
33
|
+
rspec-support (~> 3.13.0)
|
34
|
+
rspec-expectations (3.13.0)
|
34
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
35
|
-
rspec-support (~> 3.
|
36
|
-
rspec-mocks (3.
|
36
|
+
rspec-support (~> 3.13.0)
|
37
|
+
rspec-mocks (3.13.1)
|
37
38
|
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
-
rspec-support (~> 3.
|
39
|
-
rspec-support (3.
|
40
|
-
rubocop (1.
|
39
|
+
rspec-support (~> 3.13.0)
|
40
|
+
rspec-support (3.13.1)
|
41
|
+
rubocop (1.64.1)
|
41
42
|
json (~> 2.3)
|
42
43
|
language_server-protocol (>= 3.17.0)
|
43
44
|
parallel (~> 1.10)
|
@@ -45,27 +46,32 @@ GEM
|
|
45
46
|
rainbow (>= 2.2.2, < 4.0)
|
46
47
|
regexp_parser (>= 1.8, < 3.0)
|
47
48
|
rexml (>= 3.2.5, < 4.0)
|
48
|
-
rubocop-ast (>= 1.
|
49
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
49
50
|
ruby-progressbar (~> 1.7)
|
50
51
|
unicode-display_width (>= 2.4.0, < 3.0)
|
51
|
-
rubocop-ast (1.
|
52
|
-
parser (>= 3.
|
53
|
-
rubocop-capybara (2.
|
52
|
+
rubocop-ast (1.31.3)
|
53
|
+
parser (>= 3.3.1.0)
|
54
|
+
rubocop-capybara (2.21.0)
|
54
55
|
rubocop (~> 1.41)
|
55
|
-
rubocop-factory_bot (2.
|
56
|
+
rubocop-factory_bot (2.26.0)
|
56
57
|
rubocop (~> 1.41)
|
57
58
|
rubocop-rake (0.6.0)
|
58
59
|
rubocop (~> 1.0)
|
59
|
-
rubocop-rspec (2.
|
60
|
+
rubocop-rspec (2.31.0)
|
60
61
|
rubocop (~> 1.40)
|
61
62
|
rubocop-capybara (~> 2.17)
|
62
63
|
rubocop-factory_bot (~> 2.22)
|
64
|
+
rubocop-rspec_rails (~> 2.28)
|
65
|
+
rubocop-rspec_rails (2.29.0)
|
66
|
+
rubocop (~> 1.40)
|
63
67
|
ruby-progressbar (1.13.0)
|
68
|
+
strscan (3.1.0)
|
64
69
|
unicode-display_width (2.5.0)
|
65
70
|
xxhash (0.5.0)
|
66
71
|
|
67
72
|
PLATFORMS
|
68
73
|
arm64-darwin-21
|
74
|
+
arm64-darwin-22
|
69
75
|
|
70
76
|
DEPENDENCIES
|
71
77
|
rake (~> 13.0)
|
data/exe/xaba
CHANGED
data/lib/xaba/cli.rb
CHANGED
@@ -144,11 +144,14 @@ module XABA
|
|
144
144
|
printf "%5d: %s\n", i, e.inspect
|
145
145
|
end
|
146
146
|
when 1
|
147
|
-
printf "%
|
147
|
+
printf "%8s %8s %8s %8s %8s %8s %s\n", "idx", "doffset", "compsz", "origsz", "configsz", "dbgsz", "name"
|
148
148
|
@manifest.assemblies.each_with_index do |a, i|
|
149
|
+
data_offset = @blob.descriptors[i].data_offset
|
149
150
|
compsz = @blob.descriptors[i].data_size
|
150
151
|
origsz = @blob.data_entries[i].original_size
|
151
|
-
|
152
|
+
configsz = @blob.descriptors[i].config_data_size
|
153
|
+
dbgsz = @blob.descriptors[i].debug_data_size
|
154
|
+
printf "%8d %8x %8d %8d %8d %8d %s\n", a.blob_idx, data_offset, compsz, origsz, configsz, dbgsz, a.name
|
152
155
|
end
|
153
156
|
else
|
154
157
|
# minimal verbosity
|
@@ -172,6 +175,8 @@ module XABA
|
|
172
175
|
decompressed = LZ4.block_decode(de.data)
|
173
176
|
dll_fname = File.join(@options[:output], "#{name}.dll")
|
174
177
|
File.binwrite dll_fname, decompressed
|
178
|
+
|
179
|
+
File.binwrite("#{dll_fname}.config", de.config) if de.config
|
175
180
|
end
|
176
181
|
end
|
177
182
|
|
data/lib/xaba/container.rb
CHANGED
@@ -13,8 +13,13 @@ module XABA
|
|
13
13
|
@hash64_entries = @file_header.local_entry_count.times.map { HashEntry.read(f) }
|
14
14
|
|
15
15
|
@data_entries = @descriptors.map do |d|
|
16
|
+
f.seek d.data_offset
|
16
17
|
DataEntry.read(f).tap do |de|
|
17
18
|
de.data = f.read(d.data_size - DataEntry::SIZE)
|
19
|
+
if d.config_data_offset != 0 && d.config_data_size != 0
|
20
|
+
f.seek d.config_data_offset
|
21
|
+
de.config = f.read(d.config_data_size)
|
22
|
+
end
|
18
23
|
end
|
19
24
|
end
|
20
25
|
self
|
@@ -89,7 +94,7 @@ module XABA
|
|
89
94
|
end
|
90
95
|
|
91
96
|
class DataEntry < IOStruct.new("a4LL", :magic, :index, :original_size)
|
92
|
-
attr_accessor :data
|
97
|
+
attr_accessor :data, :config
|
93
98
|
|
94
99
|
def inspect
|
95
100
|
super.sub(/^#<struct /, "<")
|
@@ -101,7 +106,7 @@ module XABA
|
|
101
106
|
|
102
107
|
def self.read(f)
|
103
108
|
r = super
|
104
|
-
raise "invalid magic: #{r.magic}" if r.magic != "XALZ"
|
109
|
+
raise "invalid magic: #{r.magic.inspect}" if r.magic != "XALZ"
|
105
110
|
|
106
111
|
r
|
107
112
|
end
|
data/lib/xaba/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xaba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey "Zed" Zaikin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: extlz4
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
100
|
requirements: []
|
101
|
-
rubygems_version: 3.
|
101
|
+
rubygems_version: 3.5.6
|
102
102
|
signing_key:
|
103
103
|
specification_version: 4
|
104
104
|
summary: "(un)packer for Xamarin assemblies.blob"
|