dsh-ipa-build 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SKILL.md +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/scripts/bootstrap.sh +1 -1
- package/scripts/ipa +5 -3
- package/scripts/ipa.ps1 +4 -3
package/SKILL.md
CHANGED
package/package.json
CHANGED
package/plugin.json
CHANGED
package/scripts/bootstrap.sh
CHANGED
|
@@ -81,7 +81,7 @@ fi
|
|
|
81
81
|
|
|
82
82
|
# ldid 是 ProcursusTeam/ldid v2.1.5-procursus8(commit 18255c5)的源码快照,
|
|
83
83
|
# 想复现就 checkout 那个 commit;这里先校验快照没被改过
|
|
84
|
-
LDID_CPP_SHA="
|
|
84
|
+
LDID_CPP_SHA="78a5f4d08f8affa6bbbf7b26947ba26023bca91347ee78c4f70d46cf7b67563d"
|
|
85
85
|
|
|
86
86
|
if [ ! -x "$tc/bin/ldid" ]; then
|
|
87
87
|
echo "编 ldid"
|
package/scripts/ipa
CHANGED
|
@@ -120,10 +120,12 @@ def sig_state(base, _fat_endian=None):
|
|
|
120
120
|
pos += size
|
|
121
121
|
if sigoff is None or sigoff + 12 > len(data):
|
|
122
122
|
return None
|
|
123
|
-
|
|
123
|
+
# CodeSignature 的 SuperBlob 在文件里固定大端(FA DE 0C C0),
|
|
124
|
+
# 跟 slice 自己是小端还是大端无关,这里不能跟着 slice 走
|
|
125
|
+
if rd(sigoff, 4, 'be') != 0xfade0cc0:
|
|
124
126
|
return None
|
|
125
|
-
count = rd(sigoff + 4, 4,
|
|
126
|
-
types = [rd(sigoff + 8 + i * 8, 4,
|
|
127
|
+
count = rd(sigoff + 4, 4, 'be')
|
|
128
|
+
types = [rd(sigoff + 8 + i * 8, 4, 'be') for i in range(min(count, 20))]
|
|
127
129
|
if 0x10000 in types:
|
|
128
130
|
return 'cms'
|
|
129
131
|
if 0 in types:
|
package/scripts/ipa.ps1
CHANGED
|
@@ -97,13 +97,14 @@ function Get-SigState($fs, $base) {
|
|
|
97
97
|
if ($sigoff -lt 0) { return '没签' }
|
|
98
98
|
$sb = Read-At $fs $sigoff 12
|
|
99
99
|
if ($sb -eq $null) { return '没签' }
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
# SuperBlob 固定大端(FA DE 0C C0),不跟 slice 的字节序走
|
|
101
|
+
if ((U32-At $sb 0 $true) -ne 4208856256) { return '没签' }
|
|
102
|
+
$cnt = U32-At $sb 4 $true
|
|
102
103
|
if ($cnt -gt 20) { $cnt = 20 }
|
|
103
104
|
$idx = Read-At $fs ($sigoff + 8) ($cnt * 8)
|
|
104
105
|
if ($idx -eq $null) { return '没签' }
|
|
105
106
|
for ($i = 0; $i -lt $cnt; $i++) {
|
|
106
|
-
if ((U32-At $idx ($i * 8) $
|
|
107
|
+
if ((U32-At $idx ($i * 8) $true) -eq 65536) { return '真证书签名(有 CMS)' }
|
|
107
108
|
}
|
|
108
109
|
return 'ad-hoc 伪签名(只有 CodeDirectory)'
|
|
109
110
|
}
|