diff options
| author | 2012-02-02 23:09:47 +0100 | |
|---|---|---|
| committer | 2012-02-02 23:09:47 +0100 | |
| commit | 1fc7fe84bdd7e4daf35ed19e5f7171c48c2d6751 (patch) | |
| tree | 38e9c4d797983ccbbd0f5744ca27b7c1a17d77d0 /src/idevicerestore.c | |
| parent | 1cc6b61c34a00a7b779ee9511c9696b853a7836f (diff) | |
| download | idevicerestore-1fc7fe84bdd7e4daf35ed19e5f7171c48c2d6751.tar.gz idevicerestore-1fc7fe84bdd7e4daf35ed19e5f7171c48c2d6751.tar.bz2 | |
add limera1n exploit and use pwned dfu mode for custom firmwares
Diffstat (limited to 'src/idevicerestore.c')
| -rw-r--r-- | src/idevicerestore.c | 17 | 
1 files changed, 17 insertions, 0 deletions
| diff --git a/src/idevicerestore.c b/src/idevicerestore.c index 6733a59..bfe19c7 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -36,6 +36,8 @@  #include "recovery.h"  #include "idevicerestore.h" +#include "limera1n.h" +  int use_apple_server;  static struct option longopts[] = { @@ -406,6 +408,21 @@ int main(int argc, char* argv[]) {  	// if the device is in DFU mode, place device into recovery mode  	if (client->mode->index == MODE_DFU) {  		recovery_client_free(client); +		if (client->flags & FLAG_CUSTOM) { +			info("connecting to DFU\n"); +			if (dfu_client_new(client) < 0) { +				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); +				return -1; +			} +			dfu_client_free(client); +			info("exploited\n"); +		}  		if (dfu_enter_recovery(client, build_identity) < 0) {  			error("ERROR: Unable to place device into recovery mode\n");  			plist_free(buildmanifest); | 
