|
15 | 15 |
|
16 | 16 | KNOWN_MODELS = {
|
17 | 17 | 3: ("AirPort Extreme 802.11g", None),
|
18 |
| - 102: ("AirPort Express 802.11g", "1f1ba10645645be2bab3c80f2e8eaae1"), |
| 18 | + 102: ("AirPort Express 802.11g", "0601ba1a587a44c29b91eb2b0ba88dc9"), |
19 | 19 | 104: ("AirPort Extreme 802.11n (1st Generation)", None),
|
20 | 20 | 105: ("AirPort Extreme 802.11n (2nd Generation)", None),
|
21 | 21 | 106: ("AirPort Time Capsule 802.11n (1st Generation)", None),
|
22 |
| - 107: ("AirPort Express 802.11n (1st Generation)", "5249c351028bf1fd2bd1849e28b23f24"), |
23 |
| - 108: ("AirPort Extreme 802.11n (3rd Generation)", "bb7deb0970d8ee2e00fa46cb1c3c098e"), |
| 22 | + 107: ("AirPort Express 802.11n (1st Generation)", "4b53d84d1f95eedd0af3a7ba0d94180c"), |
| 23 | + 108: ("AirPort Extreme 802.11n (3rd Generation)", "a267f0156dc6f10e21d865ef391a2ea6"), |
24 | 24 | 109: ("AirPort Time Capsule 802.11n (2nd Generation)", None),
|
25 | 25 | 113: ("AirPort Time Capsule 802.11n (3rd Generation)", None),
|
26 | 26 | 114: ("AirPort Extreme 802.11n (4th Generation)", None),
|
27 |
| - 115: ("AirPort Express 802.11n (2nd Generation)", "1075e806f4770cd4763bd285a64e9174"), |
| 27 | + 115: ("AirPort Express 802.11n (2nd Generation)", "096ff31ae96913f45719f1a18368b65c"), |
28 | 28 | 116: ("AirPort Time Capsule 802.11n (4th Generation)", None),
|
29 | 29 | 117: ("AirPort Extreme 802.11n (5th Generation)", None),
|
30 | 30 | 119: ("AirPort Time Capsule 802.11ac", None),
|
31 |
| - 120: ("AirPort Extreme 802.11ac", "688cdd3b1b6bdda207b6cec2735292d2"), |
| 31 | + 120: ("AirPort Extreme 802.11ac", "7196c6270675c2822694ede65674b5fa"), |
32 | 32 | }
|
33 | 33 |
|
34 |
| - |
35 |
| -def shuffle_key(key: bytes) -> bytes: |
36 |
| - # Apple does a shuffle of the decryption key stored in firmware |
37 |
| - return bytes([key[i] ^ (i + 0x19) for i in range(len(key))]) |
38 |
| - |
39 |
| - |
40 | 34 | def encrypt_payload(key: bytes, iv: bytes, input: bytes, decrypt: bool) -> bytes:
|
41 | 35 | def chunkify(lst, n):
|
42 | 36 | for i in range(0, len(lst), n):
|
@@ -175,7 +169,7 @@ def get_info(model: int):
|
175 | 169 | if info is None:
|
176 | 170 | raise BaseBinaryError("Unknown model %s" % hex(model), None)
|
177 | 171 | (name, key) = info
|
178 |
| - real_key = None if key is None else shuffle_key(bytes.fromhex(key)) |
| 172 | + real_key = None if key is None else bytes.fromhex(key) |
179 | 173 | return ModelInfo(name, real_key, model != 102)
|
180 | 174 |
|
181 | 175 |
|
|
0 commit comments