From 451804fd967684c434ef031703c9676066ab195b Mon Sep 17 00:00:00 2001 From: tihmstar Date: Mon, 9 Oct 2017 00:36:57 +0200 Subject: [PATCH] blocking update install in pwndfu mode --- futurerestore.xcodeproj/project.pbxproj | 10 +++++++--- futurerestore/futurerestore.cpp | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/futurerestore.xcodeproj/project.pbxproj b/futurerestore.xcodeproj/project.pbxproj index 609bd909..c79de874 100644 --- a/futurerestore.xcodeproj/project.pbxproj +++ b/futurerestore.xcodeproj/project.pbxproj @@ -12,10 +12,10 @@ 878587AB1D89D590008689F0 /* libimobiledevice.6.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 878587AA1D89D590008689F0 /* libimobiledevice.6.dylib */; }; 878587AD1D89D59E008689F0 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 878587AC1D89D59E008689F0 /* libz.tbd */; }; 878587AF1D89D5A5008689F0 /* libcurl.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 878587AE1D89D5A5008689F0 /* libcurl.tbd */; }; - 878587B31D89D5D5008689F0 /* libzip.4.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 878587B21D89D5D5008689F0 /* libzip.4.dylib */; }; 878587B71D89D637008689F0 /* libirecovery.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 878587B61D89D637008689F0 /* libirecovery.2.dylib */; }; 8788A6811EE8426A00138E07 /* libipatcher.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8788A6801EE8426A00138E07 /* libipatcher.0.dylib */; }; 8788A6831EE8544000138E07 /* jssy.c in Sources */ = {isa = PBXBuildFile; fileRef = 8788A6821EE8544000138E07 /* jssy.c */; }; + 878E1AC51F73EB3F00B1565B /* libzip.5.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 878E1AC41F73EB3F00B1565B /* libzip.5.dylib */; }; 8799B0B21D89D99D002F4D5F /* futurerestore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8799B0B01D89D99D002F4D5F /* futurerestore.cpp */; }; 8799B0B31D89DAE7002F4D5F /* idevicerestore.c in Sources */ = {isa = PBXBuildFile; fileRef = 8785875C1D89D1C1008689F0 /* idevicerestore.c */; settings = {COMPILER_FLAGS = "-D HAVE_CONFIG_H=1 "; }; }; 8799B0B41D89DAF6002F4D5F /* tss.c in Sources */ = {isa = PBXBuildFile; fileRef = 878587761D89D1C1008689F0 /* tss.c */; }; @@ -122,6 +122,7 @@ 878587B61D89D637008689F0 /* libirecovery.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libirecovery.2.dylib; path = ../../../../usr/local/lib/libirecovery.2.dylib; sourceTree = ""; }; 8788A6801EE8426A00138E07 /* libipatcher.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libipatcher.0.dylib; path = ../../../../usr/local/lib/libipatcher.0.dylib; sourceTree = ""; }; 8788A6821EE8544000138E07 /* jssy.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jssy.c; path = external/tsschecker/external/jssy/jssy/jssy.c; sourceTree = ""; }; + 878E1AC41F73EB3F00B1565B /* libzip.5.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libzip.5.dylib; path = ../../../../usr/local/Cellar/libzip/1.3.0/lib/libzip.5.dylib; sourceTree = ""; }; 8799B0B01D89D99D002F4D5F /* futurerestore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = futurerestore.cpp; sourceTree = ""; }; 8799B0B11D89D99D002F4D5F /* futurerestore.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = futurerestore.hpp; sourceTree = ""; }; 87F574C51E151D42008D5C4D /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = ../../../../usr/lib/libcrypto.dylib; sourceTree = ""; }; @@ -136,13 +137,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 878E1AC51F73EB3F00B1565B /* libzip.5.dylib in Frameworks */, + 878587AD1D89D59E008689F0 /* libz.tbd in Frameworks */, 8788A6811EE8426A00138E07 /* libipatcher.0.dylib in Frameworks */, 87F574D01E151F44008D5C4D /* libcrypto.dylib in Frameworks */, 87F574CB1E151E97008D5C4D /* libfragmentzip.0.dylib in Frameworks */, 878587B71D89D637008689F0 /* libirecovery.2.dylib in Frameworks */, - 878587B31D89D5D5008689F0 /* libzip.4.dylib in Frameworks */, 878587AF1D89D5A5008689F0 /* libcurl.tbd in Frameworks */, - 878587AD1D89D59E008689F0 /* libz.tbd in Frameworks */, 878587AB1D89D590008689F0 /* libimobiledevice.6.dylib in Frameworks */, 878587A71D89D56E008689F0 /* libplist.3.dylib in Frameworks */, ); @@ -278,6 +279,7 @@ 87F574C21E151CDE008D5C4D /* Frameworks */ = { isa = PBXGroup; children = ( + 878E1AC41F73EB3F00B1565B /* libzip.5.dylib */, 8788A6801EE8426A00138E07 /* libipatcher.0.dylib */, 87F574CE1E151F11008D5C4D /* libSystem.tbd */, 87F574CC1E151EF8008D5C4D /* libcorecrypto.tbd */, @@ -467,6 +469,7 @@ /usr/lib, /usr/local/opt/openssl/lib, "$(SDKROOT)/usr/lib/system", + /usr/local/Cellar/libzip/1.3.0/lib, ); OTHER_CFLAGS = "-DHAVE_LIBIPATCHER"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -484,6 +487,7 @@ /usr/lib, /usr/local/opt/openssl/lib, "$(SDKROOT)/usr/lib/system", + /usr/local/Cellar/libzip/1.3.0/lib, ); OTHER_CFLAGS = "-DHAVE_LIBIPATCHER"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/futurerestore/futurerestore.cpp b/futurerestore/futurerestore.cpp index 96dd8f16..1844c6df 100644 --- a/futurerestore/futurerestore.cpp +++ b/futurerestore/futurerestore.cpp @@ -553,6 +553,9 @@ int futurerestore::doRestore(const char *ipsw){ client->ipsw = strdup(ipsw); if (!_isUpdateInstall) client->flags |= FLAG_ERASE; + else if (_enterPwnRecoveryRequested){ + reterror(577, "ERROR: Update install is not supported in pwnDFU mode\n"); + } getDeviceMode(true); info("Found device in %s mode\n", client->mode->string);