mootool 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +7 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +71 -67
- data/lib/mootool/command.rb +1 -0
- data/lib/mootool/controller_base.rb +1 -0
- data/lib/mootool/controllers/dwarf.rb +2 -1
- data/lib/mootool/controllers/dyld_linker.rb +1 -0
- data/lib/mootool/controllers/dyld_shared_cache.rb +1 -0
- data/lib/mootool/controllers/fat_binary.rb +1 -0
- data/lib/mootool/controllers/kernel_collection.rb +4 -3
- data/lib/mootool/controllers/sections.rb +1 -0
- data/lib/mootool/core_extensions.rb +3 -3
- data/lib/mootool/models/decompressor.rb +5 -2
- data/lib/mootool/models/device_tree.rb +5 -3
- data/lib/mootool/models/img4.rb +2 -1
- data/lib/mootool/models/ipsw.rb +5 -1
- data/lib/mootool/version.rb +2 -1
- data/lib/mootool.rb +1 -0
- data/sorbet/config +1 -1
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/rainbow.rbi +2 -2
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +48 -82
- data/sorbet/rbi/gems/childprocess@4.1.0.rbi +107 -153
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +192 -332
- data/sorbet/rbi/gems/docile@1.4.0.rbi +376 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
- data/sorbet/rbi/gems/iniparse@1.5.0.rbi +166 -276
- data/sorbet/rbi/gems/{json@2.6.2.rbi → json@2.6.3.rbi} +119 -228
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
- data/sorbet/rbi/gems/lzfse@0.0.2.rbi +55 -0
- data/sorbet/rbi/gems/lzss@0.1.rbi +8 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +52 -80
- data/sorbet/rbi/gems/{overcommit@0.59.1.rbi → overcommit@0.60.0.rbi} +534 -887
- data/sorbet/rbi/gems/parallel@1.23.0.rbi +273 -0
- data/sorbet/rbi/gems/parser@3.2.2.4.rbi +5451 -0
- data/sorbet/rbi/gems/{plist@3.6.0.rbi → plist@3.7.0.rbi} +125 -3
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
- data/sorbet/rbi/gems/prism@0.17.1.rbi +27700 -0
- data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +141 -191
- data/sorbet/rbi/gems/rake@13.1.0.rbi +2887 -0
- data/sorbet/rbi/gems/{rbi@0.0.15.rbi → rbi@0.1.4.rbi} +979 -1676
- data/sorbet/rbi/gems/regexp_parser@2.8.2.rbi +3749 -0
- data/sorbet/rbi/gems/{rexml@3.2.5.rbi → rexml@3.2.6.rbi} +811 -1268
- data/sorbet/rbi/gems/{rspec-core@3.11.0.rbi → rspec-core@3.12.2.rbi} +2662 -4722
- data/sorbet/rbi/gems/{rspec-expectations@3.11.0.rbi → rspec-expectations@3.12.3.rbi} +1557 -2608
- data/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi +5306 -0
- data/sorbet/rbi/gems/rspec-support@3.12.1.rbi +1609 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +82 -0
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7090 -0
- data/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi +1125 -0
- data/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi +878 -0
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +88 -173
- data/sorbet/rbi/gems/rubocop-rspec@2.25.0.rbi +7997 -0
- data/sorbet/rbi/gems/rubocop@1.57.2.rbi +56813 -0
- data/sorbet/rbi/gems/ruby-lzma@0.4.3.rbi +19 -0
- data/sorbet/rbi/gems/ruby-macho@3.0.0.rbi +899 -1237
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
- data/sorbet/rbi/gems/rubyzip@2.3.2.rbi +808 -1275
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +216 -0
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2148 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
- data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
- data/sorbet/rbi/gems/tapioca@0.11.12.rbi +3507 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
- data/sorbet/rbi/gems/{yard@0.9.28.rbi → yard@0.9.34.rbi} +4531 -7160
- data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +24 -72
- data/sorbet/rbi/sorbet-typed/lib/rake/all/rake.rbi +385 -1697
- data/sorbet/rbi/sorbet-typed/lib/rspec-core/all/rspec-core.rbi +7 -30
- data/sorbet/rbi/sorbet-typed/lib/rubocop/>=1.8/rubocop.rbi +1 -3
- data/sorbet/rbi/sorbet-typed/lib/thor/all/thor.rbi +905 -0
- data/sorbet/rbi/sorbet-typed/lib/yard/all/yard.rbi +35 -0
- data/sorbet/tapioca/require.rb +13 -1
- metadata +47 -35
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -8
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -8
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -353
- data/sorbet/rbi/gems/parser@3.1.2.1.rbi +0 -6198
- data/sorbet/rbi/gems/pry@0.14.1.rbi +0 -8
- data/sorbet/rbi/gems/rake@13.0.6.rbi +0 -3587
- data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +0 -3927
- data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +0 -6506
- data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +0 -2040
- data/sorbet/rbi/gems/rspec@3.11.0.rbi +0 -120
- data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +0 -7990
- data/sorbet/rbi/gems/rubocop-rspec@2.12.1.rbi +0 -7604
- data/sorbet/rbi/gems/rubocop@1.35.0.rbi +0 -62260
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -1445
- data/sorbet/rbi/gems/spoom@1.1.12.rbi +0 -2829
- data/sorbet/rbi/gems/tapioca@0.9.3.rbi +0 -2151
- data/sorbet/rbi/gems/thor@1.2.1.rbi +0 -4532
- data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +0 -60
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -8
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -3075
- data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +0 -458
- data/sorbet/rbi/todo.rbi +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4b46205baa6c47ebe654ff25f8db755911ebbbbcaeaa8a779d13f505f385f07
|
4
|
+
data.tar.gz: e8c5f1c19fdb080244ed7b5999c72b4a35a8a1d76e928eef5050f3ff0b0798b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05bdbd7bdfc6f42a384a0ef5d0475b3b9b0f28c79efe7620e8214d04e37810051dca180add54591deaf04375e1048506627342ffeb94bc3b79f6a84d89c64c24
|
7
|
+
data.tar.gz: d263e31f809c885695ffce50840ffa6c43f58fcb1f1e8dcb313284c8db3e5f8bd2f1f39ad250f94e86313b1c3541f46b7b569e3f0a8979f95b1c4695708a46da
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
AllCops:
|
2
2
|
TargetRubyVersion: 3.0
|
3
|
+
NewCops: enable
|
3
4
|
|
4
5
|
Metrics/BlockLength:
|
5
6
|
Max: 35
|
@@ -10,6 +11,12 @@ Metrics/BlockLength:
|
|
10
11
|
Metrics/MethodLength:
|
11
12
|
Max: 35
|
12
13
|
|
14
|
+
Metrics/CyclomaticComplexity:
|
15
|
+
Max: 15
|
16
|
+
|
17
|
+
Metrics/PerceivedComplexity:
|
18
|
+
Max: 15
|
19
|
+
|
13
20
|
Metrics/AbcSize:
|
14
21
|
Max: 25
|
15
22
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mootool (0.2.
|
4
|
+
mootool (0.2.8)
|
5
5
|
lzfse
|
6
6
|
lzss
|
7
7
|
plist (~> 3)
|
@@ -15,112 +15,115 @@ GEM
|
|
15
15
|
specs:
|
16
16
|
ast (2.4.2)
|
17
17
|
childprocess (4.1.0)
|
18
|
-
coderay (1.1.3)
|
19
18
|
diff-lcs (1.5.0)
|
20
19
|
docile (1.4.0)
|
20
|
+
erubi (1.12.0)
|
21
21
|
iniparse (1.5.0)
|
22
|
-
json (2.6.
|
23
|
-
|
22
|
+
json (2.6.3)
|
23
|
+
language_server-protocol (3.17.0.3)
|
24
|
+
lzfse (0.0.2)
|
24
25
|
lzss (0.1)
|
25
|
-
method_source (1.0.0)
|
26
26
|
netrc (0.11.0)
|
27
|
-
overcommit (0.
|
27
|
+
overcommit (0.60.0)
|
28
28
|
childprocess (>= 0.6.3, < 5)
|
29
29
|
iniparse (~> 1.4)
|
30
30
|
rexml (~> 3.2)
|
31
|
-
parallel (1.
|
32
|
-
parser (3.
|
31
|
+
parallel (1.23.0)
|
32
|
+
parser (3.2.2.4)
|
33
33
|
ast (~> 2.4.1)
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
racc
|
35
|
+
plist (3.7.0)
|
36
|
+
prettier_print (1.2.1)
|
37
|
+
prism (0.17.1)
|
38
|
+
racc (1.7.3)
|
38
39
|
rainbow (3.1.1)
|
39
|
-
rake (13.0
|
40
|
-
rbi (0.
|
41
|
-
|
42
|
-
parser (>= 2.6.4.0)
|
40
|
+
rake (13.1.0)
|
41
|
+
rbi (0.1.4)
|
42
|
+
prism (>= 0.17.1, < 0.18)
|
43
43
|
sorbet-runtime (>= 0.5.9204)
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
rspec-
|
49
|
-
rspec-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
rspec-expectations (3.11.0)
|
44
|
+
regexp_parser (2.8.2)
|
45
|
+
rexml (3.2.6)
|
46
|
+
rspec (3.12.0)
|
47
|
+
rspec-core (~> 3.12.0)
|
48
|
+
rspec-expectations (~> 3.12.0)
|
49
|
+
rspec-mocks (~> 3.12.0)
|
50
|
+
rspec-core (3.12.2)
|
51
|
+
rspec-support (~> 3.12.0)
|
52
|
+
rspec-expectations (3.12.3)
|
54
53
|
diff-lcs (>= 1.2.0, < 2.0)
|
55
|
-
rspec-support (~> 3.
|
56
|
-
rspec-mocks (3.
|
54
|
+
rspec-support (~> 3.12.0)
|
55
|
+
rspec-mocks (3.12.6)
|
57
56
|
diff-lcs (>= 1.2.0, < 2.0)
|
58
|
-
rspec-support (~> 3.
|
59
|
-
rspec-support (3.
|
60
|
-
rubocop (1.
|
57
|
+
rspec-support (~> 3.12.0)
|
58
|
+
rspec-support (3.12.1)
|
59
|
+
rubocop (1.57.2)
|
61
60
|
json (~> 2.3)
|
61
|
+
language_server-protocol (>= 3.17.0)
|
62
62
|
parallel (~> 1.10)
|
63
|
-
parser (>= 3.
|
63
|
+
parser (>= 3.2.2.4)
|
64
64
|
rainbow (>= 2.2.2, < 4.0)
|
65
65
|
regexp_parser (>= 1.8, < 3.0)
|
66
66
|
rexml (>= 3.2.5, < 4.0)
|
67
|
-
rubocop-ast (>= 1.
|
67
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
68
68
|
ruby-progressbar (~> 1.7)
|
69
|
-
unicode-display_width (>=
|
70
|
-
rubocop-ast (1.
|
71
|
-
parser (>= 3.
|
69
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
70
|
+
rubocop-ast (1.30.0)
|
71
|
+
parser (>= 3.2.1.0)
|
72
|
+
rubocop-capybara (2.19.0)
|
73
|
+
rubocop (~> 1.41)
|
74
|
+
rubocop-factory_bot (2.24.0)
|
75
|
+
rubocop (~> 1.33)
|
72
76
|
rubocop-rake (0.6.0)
|
73
77
|
rubocop (~> 1.0)
|
74
|
-
rubocop-rspec (2.
|
75
|
-
rubocop (~> 1.
|
78
|
+
rubocop-rspec (2.25.0)
|
79
|
+
rubocop (~> 1.40)
|
80
|
+
rubocop-capybara (~> 2.17)
|
81
|
+
rubocop-factory_bot (~> 2.22)
|
76
82
|
ruby-lzma (0.4.3)
|
77
83
|
ruby-macho (3.0.0)
|
78
|
-
ruby-progressbar (1.
|
84
|
+
ruby-progressbar (1.13.0)
|
79
85
|
rubyzip (2.3.2)
|
80
|
-
simplecov (0.
|
86
|
+
simplecov (0.22.0)
|
81
87
|
docile (~> 1.1)
|
82
88
|
simplecov-html (~> 0.11)
|
83
89
|
simplecov_json_formatter (~> 0.1)
|
84
90
|
simplecov-html (0.12.3)
|
85
91
|
simplecov_json_formatter (0.1.4)
|
86
|
-
sorbet (0.5.
|
87
|
-
sorbet-static (= 0.5.
|
88
|
-
sorbet-runtime (0.5.
|
89
|
-
sorbet-static (0.5.
|
90
|
-
sorbet-static (0.5.
|
91
|
-
sorbet-static (0.5.
|
92
|
-
|
93
|
-
sorbet (= 0.5.
|
94
|
-
|
95
|
-
|
96
|
-
sorbet (>= 0.5.
|
97
|
-
|
92
|
+
sorbet (0.5.11139)
|
93
|
+
sorbet-static (= 0.5.11139)
|
94
|
+
sorbet-runtime (0.5.11139)
|
95
|
+
sorbet-static (0.5.11139-universal-darwin)
|
96
|
+
sorbet-static (0.5.11139-x86_64-linux)
|
97
|
+
sorbet-static-and-runtime (0.5.11139)
|
98
|
+
sorbet (= 0.5.11139)
|
99
|
+
sorbet-runtime (= 0.5.11139)
|
100
|
+
spoom (1.2.4)
|
101
|
+
erubi (>= 1.10.0)
|
102
|
+
sorbet-static-and-runtime (>= 0.5.10187)
|
103
|
+
syntax_tree (>= 6.1.1)
|
98
104
|
thor (>= 0.19.2)
|
99
|
-
|
100
|
-
|
105
|
+
syntax_tree (6.2.0)
|
106
|
+
prettier_print (>= 1.2.0)
|
107
|
+
tapioca (0.11.12)
|
108
|
+
bundler (>= 2.2.25)
|
101
109
|
netrc (>= 0.11.0)
|
102
110
|
parallel (>= 1.21.0)
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
spoom (~> 1.1.0, >= 1.1.11)
|
111
|
+
rbi (>= 0.1.4, < 0.2)
|
112
|
+
sorbet-static-and-runtime (>= 0.5.10187)
|
113
|
+
spoom (~> 1.2.0, >= 1.2.0)
|
107
114
|
thor (>= 1.2.0)
|
108
115
|
yard-sorbet
|
109
|
-
thor (1.
|
110
|
-
unicode-display_width (2.
|
111
|
-
|
112
|
-
|
113
|
-
parser (>= 3.1.0)
|
114
|
-
webrick (1.7.0)
|
115
|
-
yard (0.9.28)
|
116
|
-
webrick (~> 1.7.0)
|
117
|
-
yard-sorbet (0.6.1)
|
116
|
+
thor (1.3.0)
|
117
|
+
unicode-display_width (2.5.0)
|
118
|
+
yard (0.9.34)
|
119
|
+
yard-sorbet (0.8.1)
|
118
120
|
sorbet-runtime (>= 0.5)
|
119
121
|
yard (>= 0.9)
|
120
122
|
|
121
123
|
PLATFORMS
|
122
124
|
arm64-darwin-21
|
123
125
|
arm64-darwin-22
|
126
|
+
arm64-darwin-23
|
124
127
|
x86_64-darwin-21
|
125
128
|
x86_64-darwin-22
|
126
129
|
x86_64-linux
|
@@ -133,6 +136,7 @@ DEPENDENCIES
|
|
133
136
|
rubocop
|
134
137
|
rubocop-rake
|
135
138
|
rubocop-rspec
|
139
|
+
rubyzip
|
136
140
|
simplecov
|
137
141
|
sorbet
|
138
142
|
sorbet-runtime
|
data/lib/mootool/command.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# typed: true
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
module MooTool
|
@@ -8,16 +9,16 @@ module MooTool
|
|
8
9
|
description 'Kernel Collections'
|
9
10
|
|
10
11
|
def extract(command, output_folder)
|
11
|
-
file =
|
12
|
+
file = command.file
|
12
13
|
input = File.open(command.file, 'rb')
|
13
14
|
|
14
|
-
file.command(:LC_FILESET_ENTRY).each do |entry|
|
15
|
+
T.must(file).command(:LC_FILESET_ENTRY).each do |entry|
|
15
16
|
output_path = File.join(output_folder, entry.entry_id.to_s)
|
16
17
|
puts "Writing to #{output_path}"
|
17
18
|
output_file = File.open(output_path, 'wb')
|
18
19
|
# rubocop:disable Naming/VariableNumber
|
19
20
|
# We do not have control of this name as it is part of ruby-macho
|
20
|
-
matching = file.command(:LC_SEGMENT_64).find { |c| c.fileoff == entry.fileoff }
|
21
|
+
matching = T.must(file).command(:LC_SEGMENT_64).find { |c| c.fileoff == entry.fileoff }
|
21
22
|
# rubocop:enable Naming/VariableNumber
|
22
23
|
|
23
24
|
input.seek(matching.fileoff)
|
@@ -11,11 +11,11 @@ class Integer
|
|
11
11
|
# @return [Integer] the aligned integer
|
12
12
|
sig { params(alignment: T.nilable(Integer)).returns(Integer) }
|
13
13
|
def align(alignment = nil)
|
14
|
-
alignment ||=
|
14
|
+
alignment ||= 4
|
15
15
|
|
16
|
-
return self if alignment < 2
|
16
|
+
return self if T.must(alignment) < 2
|
17
17
|
|
18
|
-
alignment
|
18
|
+
alignment = T.must(alignment) - 1
|
19
19
|
|
20
20
|
if (self & alignment).zero?
|
21
21
|
self
|
@@ -1,9 +1,12 @@
|
|
1
|
+
# typed: false
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require 'lzfse'
|
4
5
|
require 'lzma'
|
5
6
|
require 'compress/lzss'
|
6
7
|
|
8
|
+
require 'sorbet-runtime'
|
9
|
+
|
7
10
|
module MooTool
|
8
11
|
# The magic Apple decompressor (as in it uses magics)
|
9
12
|
class Decompressor
|
@@ -21,9 +24,9 @@ module MooTool
|
|
21
24
|
when COMPRESSION_LZVN
|
22
25
|
LZFSE.lzvn_decompress(data)
|
23
26
|
when COMPRESSION_LZSS
|
24
|
-
|
27
|
+
OpenSSL::Digest::DSS.decompress(data)
|
25
28
|
when COMPRESSION_LZMA
|
26
|
-
|
29
|
+
Net::DNS::QueryTypes::ATMA.decompress(data)
|
27
30
|
else
|
28
31
|
data
|
29
32
|
end
|
@@ -36,7 +36,7 @@ module MooTool
|
|
36
36
|
end
|
37
37
|
child_count.times { @children << Node.new(tree, data) }
|
38
38
|
|
39
|
-
@tree.add_handle(self, @properties[PHANDLE_PROP].value) if @properties.key? PHANDLE_PROP
|
39
|
+
@tree.add_handle(self, T.must(@properties[PHANDLE_PROP]).value) if @properties.key? PHANDLE_PROP
|
40
40
|
end
|
41
41
|
|
42
42
|
def to_h
|
@@ -76,9 +76,11 @@ module MooTool
|
|
76
76
|
|
77
77
|
def normalize
|
78
78
|
@value = @value.split("\x00").map(&:chomp) if @name == COMPATIBLE_PROP
|
79
|
-
@value = @value.unpack1('V') if @size == 4
|
79
|
+
@value = @value.unpack1('V') if @size == 4 && @value.is_a?(String)
|
80
|
+
@value = @value.unpack1('Q') if @size == 8 && @value.is_a?(String)
|
80
81
|
|
81
82
|
@value = @value.chomp("\x00") if @value.is_a?(String) && @value.count("\x00") == 1 && @value.end_with?("\x00")
|
83
|
+
@value = @value.force_encoding('ASCII-8BIT') if @value.is_a?(String)
|
82
84
|
end
|
83
85
|
end
|
84
86
|
|
@@ -96,7 +98,7 @@ module MooTool
|
|
96
98
|
data = T.assert_type!(data, String)
|
97
99
|
@data = StringIO.new(data)
|
98
100
|
when IO
|
99
|
-
@data = T.
|
101
|
+
@data = T.let(data, T.any(IO, StringIO))
|
100
102
|
end
|
101
103
|
@root = Node.new(self, @data)
|
102
104
|
end
|
data/lib/mootool/models/img4.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# typed: false
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require 'openssl'
|
@@ -26,7 +27,7 @@ module MooTool
|
|
26
27
|
raise "Unknown IMG4 type #{@data.first.value}"
|
27
28
|
end
|
28
29
|
|
29
|
-
@manifest =
|
30
|
+
@manifest = Digest.new(@payload) if @payload.start_with?('IM4M')
|
30
31
|
end
|
31
32
|
|
32
33
|
def payload?
|
data/lib/mootool/models/ipsw.rb
CHANGED
@@ -1,11 +1,15 @@
|
|
1
|
+
# typed: true
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require 'zip'
|
4
5
|
require 'plist'
|
6
|
+
require 'net/http'
|
5
7
|
|
6
8
|
module MooTool
|
7
9
|
# Represents a single IPSW package
|
8
10
|
class IPSW
|
11
|
+
attr_reader :manifest
|
12
|
+
|
9
13
|
def initialize(file)
|
10
14
|
@file = file
|
11
15
|
@zip = Zip::File.open(file)
|
@@ -13,7 +17,7 @@ module MooTool
|
|
13
17
|
|
14
18
|
raise 'Invalid IPSW, does not contain BuildManifest.plist' unless manifest
|
15
19
|
|
16
|
-
@manifest = Plist.parse_xml
|
20
|
+
@manifest = Plist.parse_xml manifest.get_input_stream.read
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
data/lib/mootool/version.rb
CHANGED
data/lib/mootool.rb
CHANGED
data/sorbet/config
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
**/*.rbi linguist-vendored=true
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# typed:
|
1
|
+
# typed: true
|
2
2
|
|
3
3
|
# DO NOT EDIT MANUALLY
|
4
4
|
# This file was pulled from a central RBI files repository.
|
@@ -266,4 +266,4 @@ module Rainbow
|
|
266
266
|
end
|
267
267
|
|
268
268
|
sig { params(string: String).returns(Rainbow::Presenter) }
|
269
|
-
def Rainbow(string); end
|
269
|
+
def Rainbow(string); end
|
@@ -0,0 +1 @@
|
|
1
|
+
**/*.rbi linguist-generated=true
|