From dafb02dbdf03ce4bf9c321b171f3350579a33eb8 Mon Sep 17 00:00:00 2001 From: tihmstar Date: Mon, 2 Jan 2017 00:29:18 +0100 Subject: [PATCH] fixed the "only wait for nonce" option --- futurerestore/main.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/futurerestore/main.cpp b/futurerestore/main.cpp index 32ad7ead..59bf0f18 100644 --- a/futurerestore/main.cpp +++ b/futurerestore/main.cpp @@ -127,6 +127,8 @@ int main(int argc, const char * argv[]) { argv += optind; ipsw = argv[0]; + }else if (argc == optind && flags & FLAG_WAIT) { + info("User requested to only wait for APNonce to match, but not actually restoring\n"); }else{ error("argument parsing failed! agrc=%d optind=%d\n",argc,optind); if (idevicerestore_debug){ @@ -204,18 +206,20 @@ int main(int argc, const char * argv[]) { goto error; } - try { - res = client.doRestore(ipsw, flags & FLAG_UPDATE); - } catch (int error) { - if (error == -20) error("maybe you forgot -w ?\n"); - err = error; + if (ipsw) { + try { + res = client.doRestore(ipsw, flags & FLAG_UPDATE); + } catch (int error) { + if (error == -20) error("maybe you forgot -w ?\n"); + err = error; + } + cout << "Done: restoring "<< (!res ? "succeeded" : "failed")<<"." <