diff options
author | Nikias Bassen | 2022-10-18 01:09:44 +0200 |
---|---|---|
committer | Nikias Bassen | 2022-10-18 01:09:44 +0200 |
commit | d20eb2135be46a3596d4f5c97f175faa96c55929 (patch) | |
tree | eee9cb5f85ea3ed0cceb75d5350febce09abc12c /src | |
parent | f8a92587b656a0ef793e9057fafdb67cf00a188d (diff) | |
download | idevicerestore-d20eb2135be46a3596d4f5c97f175faa96c55929.tar.gz idevicerestore-d20eb2135be46a3596d4f5c97f175faa96c55929.tar.bz2 |
Use limera1n_is_supported instead of compatibility check added with previous commit
Diffstat (limited to 'src')
-rw-r--r-- | src/idevicerestore.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c index 186595b..3d6b65c 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -483,22 +483,7 @@ int idevicerestore_start(struct idevicerestore_client_t* client) return -1; } - // Check if device is vulnerable to limera1n - unsigned int cpid = 0; - dfu_get_cpid(client, &cpid); - - int limera1nDevices[] = {8920, 8922, 8930}; - int limera1nDevicesLen = sizeof limera1nDevices / sizeof limera1nDevices[0]; - int limera1nVuln = 0; - - for (int i = 0; i < limera1nDevicesLen; i++) { - if (limera1nDevices[i] == cpid) { - limera1nVuln = 1; - break; - } - } - - if (limera1nVuln == 1) { + if (limera1n_is_supported(client->device)) { info("exploiting with limera1n...\n"); if (limera1n_exploit(client->device, &client->dfu->client) != 0) { error("ERROR: limera1n exploit failed\n"); @@ -1246,7 +1231,6 @@ int idevicerestore_start(struct idevicerestore_client_t* client) return -1; } info("exploiting with limera1n\n"); - // TODO: check for non-limera1n device and fail if (limera1n_exploit(client->device, &client->dfu->client) != 0) { error("ERROR: limera1n exploit failed\n"); dfu_client_free(client); |