├── AppResign ├── AppResign.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── eular.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── eular.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── AppResign.xcscheme │ │ └── xcschememanagement.plist └── AppResign │ ├── AppResign.swift │ ├── Extension.swift │ ├── ProvisioningProfile.swift │ └── main.swift ├── Cycript-Reveal ├── Cycript-Reveal.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── eular.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── eular.xcuserdatad │ │ └── xcschemes │ │ ├── Cycript-Reveal.xcscheme │ │ └── xcschememanagement.plist ├── Cycript-Reveal │ ├── Cycript-Reveal-Prefix.pch │ ├── Cycript_Reveal.mm │ ├── Package │ │ ├── DEBIAN │ │ │ ├── control │ │ │ └── control.txt │ │ └── Library │ │ │ └── MobileSubstrate │ │ │ └── DynamicLibraries │ │ │ └── Cycript_Reveal.plist │ └── PackageVersion.plist ├── Cycript.framework │ ├── Cycript │ └── Headers │ │ └── Cycript.h ├── LatestBuild └── Reveal.framework │ ├── Headers │ ├── Reveal │ └── Versions │ ├── A │ ├── Headers │ │ ├── IBANetServiceTypes.h │ │ ├── IBARevealLoader.h │ │ ├── IBARevealLogger.h │ │ └── Reveal.h │ └── Reveal │ └── Current ├── LICENSE ├── README.md ├── Screenshot ├── AppResign.png ├── Cycript.png ├── Log1.png ├── Log2.png ├── MachOView.png ├── MicroMessengerAppDelegate.png ├── Reveal0.png ├── Reveal1.png ├── Reveal2.png ├── bitcode.png ├── iOSOpenDev.png ├── problem_0.png ├── problem_1.png ├── problem_2.png └── wechat.png ├── bin ├── class-dump ├── cycript ├── mobiledevice └── yololib ├── loadCycript ├── Cycript.framework │ ├── Cycript │ └── Headers │ │ └── Cycript.h ├── LatestBuild ├── loadCycript.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── eular.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── eular.xcuserdatad │ │ └── xcschemes │ │ ├── loadCycript.xcscheme │ │ └── xcschememanagement.plist └── loadCycript │ ├── Package │ ├── DEBIAN │ │ ├── control │ │ └── control.txt │ └── Library │ │ └── MobileSubstrate │ │ └── DynamicLibraries │ │ └── loadCycript.plist │ ├── PackageVersion.plist │ ├── loadCycript-Prefix.pch │ └── loadCycript.mm └── weixinWalk ├── LatestBuild ├── weixinWalk.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── eular.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── eular.xcuserdatad │ └── xcschemes │ ├── weixinWalk.xcscheme │ └── xcschememanagement.plist └── weixinWalk ├── Package ├── DEBIAN │ ├── control │ └── control.txt └── Library │ └── MobileSubstrate │ └── DynamicLibraries │ └── weixinWalk.plist ├── PackageVersion.plist ├── weixinWalk-Prefix.pch └── weixinWalk.mm /AppResign/AppResign.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | BBBFAE261D06B5CD0041F3FB /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBBFAE251D06B5CD0041F3FB /* main.swift */; }; 11 | BBBFAE2F1D06B7CF0041F3FB /* Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBBFAE2E1D06B7CF0041F3FB /* Extension.swift */; }; 12 | BBBFAE311D06BCBF0041F3FB /* ProvisioningProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBBFAE301D06BCBF0041F3FB /* ProvisioningProfile.swift */; }; 13 | BBE8C3731D0BD7400027C78C /* AppResign.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE8C3721D0BD7400027C78C /* AppResign.swift */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXCopyFilesBuildPhase section */ 17 | BBBFAE201D06B5CD0041F3FB /* CopyFiles */ = { 18 | isa = PBXCopyFilesBuildPhase; 19 | buildActionMask = 2147483647; 20 | dstPath = /usr/share/man/man1/; 21 | dstSubfolderSpec = 0; 22 | files = ( 23 | ); 24 | runOnlyForDeploymentPostprocessing = 1; 25 | }; 26 | /* End PBXCopyFilesBuildPhase section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | BBBFAE221D06B5CD0041F3FB /* AppResign */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = AppResign; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | BBBFAE251D06B5CD0041F3FB /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; 31 | BBBFAE2E1D06B7CF0041F3FB /* Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extension.swift; sourceTree = ""; }; 32 | BBBFAE301D06BCBF0041F3FB /* ProvisioningProfile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProvisioningProfile.swift; sourceTree = ""; }; 33 | BBE8C3721D0BD7400027C78C /* AppResign.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppResign.swift; sourceTree = ""; }; 34 | /* End PBXFileReference section */ 35 | 36 | /* Begin PBXFrameworksBuildPhase section */ 37 | BBBFAE1F1D06B5CD0041F3FB /* Frameworks */ = { 38 | isa = PBXFrameworksBuildPhase; 39 | buildActionMask = 2147483647; 40 | files = ( 41 | ); 42 | runOnlyForDeploymentPostprocessing = 0; 43 | }; 44 | /* End PBXFrameworksBuildPhase section */ 45 | 46 | /* Begin PBXGroup section */ 47 | BBBFAE191D06B5CD0041F3FB = { 48 | isa = PBXGroup; 49 | children = ( 50 | BBBFAE241D06B5CD0041F3FB /* AppResign */, 51 | BBBFAE231D06B5CD0041F3FB /* Products */, 52 | ); 53 | sourceTree = ""; 54 | }; 55 | BBBFAE231D06B5CD0041F3FB /* Products */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | BBBFAE221D06B5CD0041F3FB /* AppResign */, 59 | ); 60 | name = Products; 61 | sourceTree = ""; 62 | }; 63 | BBBFAE241D06B5CD0041F3FB /* AppResign */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | BBBFAE251D06B5CD0041F3FB /* main.swift */, 67 | BBE8C3721D0BD7400027C78C /* AppResign.swift */, 68 | BBBFAE301D06BCBF0041F3FB /* ProvisioningProfile.swift */, 69 | BBBFAE2E1D06B7CF0041F3FB /* Extension.swift */, 70 | ); 71 | path = AppResign; 72 | sourceTree = ""; 73 | }; 74 | /* End PBXGroup section */ 75 | 76 | /* Begin PBXNativeTarget section */ 77 | BBBFAE211D06B5CD0041F3FB /* AppResign */ = { 78 | isa = PBXNativeTarget; 79 | buildConfigurationList = BBBFAE291D06B5CD0041F3FB /* Build configuration list for PBXNativeTarget "AppResign" */; 80 | buildPhases = ( 81 | BBBFAE1E1D06B5CD0041F3FB /* Sources */, 82 | BBBFAE1F1D06B5CD0041F3FB /* Frameworks */, 83 | BBBFAE201D06B5CD0041F3FB /* CopyFiles */, 84 | ); 85 | buildRules = ( 86 | ); 87 | dependencies = ( 88 | ); 89 | name = AppResign; 90 | productName = AppResign; 91 | productReference = BBBFAE221D06B5CD0041F3FB /* AppResign */; 92 | productType = "com.apple.product-type.tool"; 93 | }; 94 | /* End PBXNativeTarget section */ 95 | 96 | /* Begin PBXProject section */ 97 | BBBFAE1A1D06B5CD0041F3FB /* Project object */ = { 98 | isa = PBXProject; 99 | attributes = { 100 | LastSwiftUpdateCheck = 0730; 101 | LastUpgradeCheck = 0810; 102 | ORGANIZATIONNAME = Eular; 103 | TargetAttributes = { 104 | BBBFAE211D06B5CD0041F3FB = { 105 | CreatedOnToolsVersion = 7.3.1; 106 | LastSwiftMigration = 0800; 107 | }; 108 | }; 109 | }; 110 | buildConfigurationList = BBBFAE1D1D06B5CD0041F3FB /* Build configuration list for PBXProject "AppResign" */; 111 | compatibilityVersion = "Xcode 3.2"; 112 | developmentRegion = English; 113 | hasScannedForEncodings = 0; 114 | knownRegions = ( 115 | en, 116 | ); 117 | mainGroup = BBBFAE191D06B5CD0041F3FB; 118 | productRefGroup = BBBFAE231D06B5CD0041F3FB /* Products */; 119 | projectDirPath = ""; 120 | projectRoot = ""; 121 | targets = ( 122 | BBBFAE211D06B5CD0041F3FB /* AppResign */, 123 | ); 124 | }; 125 | /* End PBXProject section */ 126 | 127 | /* Begin PBXSourcesBuildPhase section */ 128 | BBBFAE1E1D06B5CD0041F3FB /* Sources */ = { 129 | isa = PBXSourcesBuildPhase; 130 | buildActionMask = 2147483647; 131 | files = ( 132 | BBBFAE311D06BCBF0041F3FB /* ProvisioningProfile.swift in Sources */, 133 | BBBFAE2F1D06B7CF0041F3FB /* Extension.swift in Sources */, 134 | BBE8C3731D0BD7400027C78C /* AppResign.swift in Sources */, 135 | BBBFAE261D06B5CD0041F3FB /* main.swift in Sources */, 136 | ); 137 | runOnlyForDeploymentPostprocessing = 0; 138 | }; 139 | /* End PBXSourcesBuildPhase section */ 140 | 141 | /* Begin XCBuildConfiguration section */ 142 | BBBFAE271D06B5CD0041F3FB /* Debug */ = { 143 | isa = XCBuildConfiguration; 144 | buildSettings = { 145 | ALWAYS_SEARCH_USER_PATHS = NO; 146 | CLANG_ANALYZER_NONNULL = YES; 147 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 148 | CLANG_CXX_LIBRARY = "libc++"; 149 | CLANG_ENABLE_MODULES = YES; 150 | CLANG_ENABLE_OBJC_ARC = YES; 151 | CLANG_WARN_BOOL_CONVERSION = YES; 152 | CLANG_WARN_CONSTANT_CONVERSION = YES; 153 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 154 | CLANG_WARN_EMPTY_BODY = YES; 155 | CLANG_WARN_ENUM_CONVERSION = YES; 156 | CLANG_WARN_INFINITE_RECURSION = YES; 157 | CLANG_WARN_INT_CONVERSION = YES; 158 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 159 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 160 | CLANG_WARN_UNREACHABLE_CODE = YES; 161 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 162 | CODE_SIGN_IDENTITY = "-"; 163 | COPY_PHASE_STRIP = NO; 164 | DEBUG_INFORMATION_FORMAT = dwarf; 165 | ENABLE_STRICT_OBJC_MSGSEND = YES; 166 | ENABLE_TESTABILITY = YES; 167 | GCC_C_LANGUAGE_STANDARD = gnu99; 168 | GCC_DYNAMIC_NO_PIC = NO; 169 | GCC_NO_COMMON_BLOCKS = YES; 170 | GCC_OPTIMIZATION_LEVEL = 0; 171 | GCC_PREPROCESSOR_DEFINITIONS = ( 172 | "DEBUG=1", 173 | "$(inherited)", 174 | ); 175 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 176 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 177 | GCC_WARN_UNDECLARED_SELECTOR = YES; 178 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 179 | GCC_WARN_UNUSED_FUNCTION = YES; 180 | GCC_WARN_UNUSED_VARIABLE = YES; 181 | MACOSX_DEPLOYMENT_TARGET = 10.11; 182 | MTL_ENABLE_DEBUG_INFO = YES; 183 | ONLY_ACTIVE_ARCH = YES; 184 | SDKROOT = macosx; 185 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 186 | }; 187 | name = Debug; 188 | }; 189 | BBBFAE281D06B5CD0041F3FB /* Release */ = { 190 | isa = XCBuildConfiguration; 191 | buildSettings = { 192 | ALWAYS_SEARCH_USER_PATHS = NO; 193 | CLANG_ANALYZER_NONNULL = YES; 194 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 195 | CLANG_CXX_LIBRARY = "libc++"; 196 | CLANG_ENABLE_MODULES = YES; 197 | CLANG_ENABLE_OBJC_ARC = YES; 198 | CLANG_WARN_BOOL_CONVERSION = YES; 199 | CLANG_WARN_CONSTANT_CONVERSION = YES; 200 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 201 | CLANG_WARN_EMPTY_BODY = YES; 202 | CLANG_WARN_ENUM_CONVERSION = YES; 203 | CLANG_WARN_INFINITE_RECURSION = YES; 204 | CLANG_WARN_INT_CONVERSION = YES; 205 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 206 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 207 | CLANG_WARN_UNREACHABLE_CODE = YES; 208 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 209 | CODE_SIGN_IDENTITY = "-"; 210 | COPY_PHASE_STRIP = NO; 211 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 212 | ENABLE_NS_ASSERTIONS = NO; 213 | ENABLE_STRICT_OBJC_MSGSEND = YES; 214 | GCC_C_LANGUAGE_STANDARD = gnu99; 215 | GCC_NO_COMMON_BLOCKS = YES; 216 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 217 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 218 | GCC_WARN_UNDECLARED_SELECTOR = YES; 219 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 220 | GCC_WARN_UNUSED_FUNCTION = YES; 221 | GCC_WARN_UNUSED_VARIABLE = YES; 222 | MACOSX_DEPLOYMENT_TARGET = 10.11; 223 | MTL_ENABLE_DEBUG_INFO = NO; 224 | SDKROOT = macosx; 225 | }; 226 | name = Release; 227 | }; 228 | BBBFAE2A1D06B5CD0041F3FB /* Debug */ = { 229 | isa = XCBuildConfiguration; 230 | buildSettings = { 231 | PRODUCT_NAME = "$(TARGET_NAME)"; 232 | SWIFT_VERSION = 3.0; 233 | }; 234 | name = Debug; 235 | }; 236 | BBBFAE2B1D06B5CD0041F3FB /* Release */ = { 237 | isa = XCBuildConfiguration; 238 | buildSettings = { 239 | PRODUCT_NAME = "$(TARGET_NAME)"; 240 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 241 | SWIFT_VERSION = 3.0; 242 | }; 243 | name = Release; 244 | }; 245 | /* End XCBuildConfiguration section */ 246 | 247 | /* Begin XCConfigurationList section */ 248 | BBBFAE1D1D06B5CD0041F3FB /* Build configuration list for PBXProject "AppResign" */ = { 249 | isa = XCConfigurationList; 250 | buildConfigurations = ( 251 | BBBFAE271D06B5CD0041F3FB /* Debug */, 252 | BBBFAE281D06B5CD0041F3FB /* Release */, 253 | ); 254 | defaultConfigurationIsVisible = 0; 255 | defaultConfigurationName = Release; 256 | }; 257 | BBBFAE291D06B5CD0041F3FB /* Build configuration list for PBXNativeTarget "AppResign" */ = { 258 | isa = XCConfigurationList; 259 | buildConfigurations = ( 260 | BBBFAE2A1D06B5CD0041F3FB /* Debug */, 261 | BBBFAE2B1D06B5CD0041F3FB /* Release */, 262 | ); 263 | defaultConfigurationIsVisible = 0; 264 | defaultConfigurationName = Release; 265 | }; 266 | /* End XCConfigurationList section */ 267 | }; 268 | rootObject = BBBFAE1A1D06B5CD0041F3FB /* Project object */; 269 | } 270 | -------------------------------------------------------------------------------- /AppResign/AppResign.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AppResign/AppResign.xcodeproj/project.xcworkspace/xcuserdata/eular.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/AppResign/AppResign.xcodeproj/project.xcworkspace/xcuserdata/eular.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AppResign/AppResign.xcodeproj/xcuserdata/eular.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /AppResign/AppResign.xcodeproj/xcuserdata/eular.xcuserdatad/xcschemes/AppResign.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /AppResign/AppResign.xcodeproj/xcuserdata/eular.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AppResign.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | BBBFAE211D06B5CD0041F3FB 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /AppResign/AppResign/AppResign.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppResign.swift 3 | // AppResign 4 | // 5 | // Created by Eular on 6/11/16. 6 | // Copyright © 2016 Eular. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class AppResign { 12 | 13 | //MARK: Variables 14 | var provisioningProfiles: [ProvisioningProfile] = [] 15 | var codesigningCerts: [String] = [] 16 | var profileFilename: String? 17 | var curSigningCert: String = "" 18 | 19 | var ReEnableNewApplicationID = false 20 | var PreviousNewApplicationID = "" 21 | var inputFile: String = "" 22 | var outputFile: String = "" 23 | var newApplicationID: String = "" 24 | var newDisplayName: String = "" 25 | var startSize: CGFloat? 26 | var NibLoaded = false 27 | var deleteURLSchemes = false 28 | 29 | var appBundlePath: String = "" 30 | var appBundleInfoPlist: String = "" 31 | var appBundleProvisioningFilePath: String = "" 32 | var appBundleExecutable: String = "" 33 | 34 | //MARK: Constants 35 | let defaults = UserDefaults() 36 | let fileManager = FileManager.default 37 | let bundleID = "com.eular.AppResign" 38 | let arPath = "/usr/bin/ar" 39 | let mktempPath = "/usr/bin/mktemp" 40 | let tarPath = "/usr/bin/tar" 41 | let unzipPath = "/usr/bin/unzip" 42 | let zipPath = "/usr/bin/zip" 43 | let defaultsPath = "/usr/bin/defaults" 44 | let codesignPath = "/usr/bin/codesign" 45 | let securityPath = "/usr/bin/security" 46 | let chmodPath = "/bin/chmod" 47 | let cpPath = "/bin/cp" 48 | let fileCmdPath = "/usr/bin/file" 49 | let plistBuddyPath = "/usr/libexec/PlistBuddy" 50 | 51 | init() { 52 | populateProvisioningProfiles() 53 | populateCodesigningCerts() 54 | } 55 | 56 | func populateProvisioningProfiles() { 57 | self.provisioningProfiles = ProvisioningProfile.getProfiles().sorted { 58 | ($0.name == $1.name && $0.created.timeIntervalSince1970 > $1.created.timeIntervalSince1970) || $0.name < $1.name 59 | } 60 | 61 | let formatter = DateFormatter() 62 | formatter.dateStyle = .short 63 | formatter.timeStyle = .medium 64 | var newProfiles: [ProvisioningProfile] = [] 65 | 66 | for profile in provisioningProfiles { 67 | if profile.expires.timeIntervalSince1970 > Date().timeIntervalSince1970 { 68 | newProfiles.append(profile) 69 | Log("Added profile \(profile.appID), expires (\(formatter.string(from: profile.expires)))") 70 | } else { 71 | Log("Skipped profile \(profile.appID), expired (\(formatter.string(from: profile.expires)))") 72 | } 73 | } 74 | self.provisioningProfiles = newProfiles 75 | } 76 | 77 | func populateCodesigningCerts() { 78 | var output: [String] = [] 79 | 80 | let securityResult = Process().execute(securityPath, workingDirectory: nil, arguments: ["find-identity","-v","-p","codesigning"]) 81 | if securityResult.output.characters.count >= 1 { 82 | let rawResult = securityResult.output.components(separatedBy: "\"") 83 | 84 | for index in stride(from: 0, through: rawResult.count - 2, by: 2) { 85 | if !(rawResult.count - 1 < index + 1) { 86 | output.append(rawResult[index+1]) 87 | } 88 | } 89 | } 90 | self.codesigningCerts = output 91 | 92 | Log("Found \(output.count) Codesigning Certificates") 93 | } 94 | 95 | func startSigning(_ input: String, output: String) { 96 | self.inputFile = input 97 | self.outputFile = output 98 | signingThread() 99 | } 100 | 101 | func signingThread() { 102 | 103 | // MARK: Set up variables 104 | var warnings = 0 105 | var provisioningFile = self.profileFilename 106 | let signingCertificate = self.curSigningCert 107 | var eggCount: Int = 0 108 | 109 | // MARK: Create working temp folder 110 | var tempFolder: String! = nil 111 | if let tmpFolder = makeTempFolder() { 112 | tempFolder = tmpFolder 113 | } else { 114 | Log("Error creating temp folder") 115 | return 116 | } 117 | let workingDirectory = tempFolder.stringByAppendingPathComponent("out") 118 | let payloadDirectory = workingDirectory.stringByAppendingPathComponent("Payload/") 119 | let eggDirectory = tempFolder.stringByAppendingPathComponent("eggs") 120 | let entitlementsPlist = tempFolder.stringByAppendingPathComponent("entitlements.plist") 121 | Log("Temp folder: \(tempFolder)") 122 | Log("Working directory: \(workingDirectory)") 123 | Log("Payload directory: \(payloadDirectory)") 124 | 125 | // MARK: Create Egg Temp Directory 126 | do { 127 | try fileManager.createDirectory(atPath: eggDirectory, withIntermediateDirectories: true, attributes: nil) 128 | } catch let error as NSError { 129 | Log("Error creating egg temp directory") 130 | Log(error.localizedDescription) 131 | cleanup(tempFolder) 132 | return 133 | } 134 | 135 | // MARK: Process input file 136 | switch(inputFile.pathExtension.lowercased()) { 137 | case "deb": 138 | // MARK: --Unpack deb 139 | let debPath = tempFolder.stringByAppendingPathComponent("deb") 140 | do { 141 | 142 | try fileManager.createDirectory(atPath: debPath, withIntermediateDirectories: true, attributes: nil) 143 | try fileManager.createDirectory(atPath: workingDirectory, withIntermediateDirectories: true, attributes: nil) 144 | print("Extracting deb file") 145 | let debTask = Process().execute(arPath, workingDirectory: debPath, arguments: ["-x", inputFile]) 146 | Log(debTask.output) 147 | if debTask.status != 0 { 148 | Log("Error processing deb file") 149 | cleanup(tempFolder) 150 | return 151 | } 152 | 153 | var tarUnpacked = false 154 | for tarFormat in ["tar","tar.gz","tar.bz2","tar.lzma","tar.xz"]{ 155 | let dataPath = debPath.stringByAppendingPathComponent("data.\(tarFormat)") 156 | if fileManager.fileExists(atPath: dataPath){ 157 | 158 | Log("Unpacking data.\(tarFormat)") 159 | let tarTask = Process().execute(tarPath, workingDirectory: debPath, arguments: ["-xf",dataPath]) 160 | Log(tarTask.output) 161 | if tarTask.status == 0 { 162 | tarUnpacked = true 163 | } 164 | break 165 | } 166 | } 167 | if !tarUnpacked { 168 | Log("Error unpacking data.tar") 169 | cleanup(tempFolder); return 170 | } 171 | try fileManager.moveItem(atPath: debPath.stringByAppendingPathComponent("Applications"), toPath: payloadDirectory) 172 | 173 | } catch { 174 | Log("Error processing deb file") 175 | cleanup(tempFolder); return 176 | } 177 | 178 | case "ipa": 179 | //MARK: --Unzip ipa 180 | do { 181 | try fileManager.createDirectory(atPath: workingDirectory, withIntermediateDirectories: true, attributes: nil) 182 | print("Extracting ipa file") 183 | 184 | let unzipTask = self.unzip(inputFile, outputPath: workingDirectory) 185 | if unzipTask.status != 0 { 186 | Log("Error extracting ipa file") 187 | cleanup(tempFolder); return 188 | } 189 | } catch { 190 | Log("Error extracting ipa file") 191 | cleanup(tempFolder); return 192 | } 193 | 194 | case "app": 195 | // MARK: --Copy app bundle 196 | do { 197 | try fileManager.createDirectory(atPath: payloadDirectory, withIntermediateDirectories: true, attributes: nil) 198 | print("Copying app to payload directory") 199 | try fileManager.copyItem(atPath: inputFile, toPath: payloadDirectory.stringByAppendingPathComponent(inputFile.lastPathComponent)) 200 | } catch { 201 | Log("Error copying app to payload directory") 202 | cleanup(tempFolder); return 203 | } 204 | 205 | case "xcarchive": 206 | // MARK: --Copy app bundle from xcarchive 207 | do { 208 | try fileManager.createDirectory(atPath: workingDirectory, withIntermediateDirectories: true, attributes: nil) 209 | print("Copying app to payload directory") 210 | try fileManager.copyItem(atPath: inputFile.stringByAppendingPathComponent("Products/Applications/"), toPath: payloadDirectory) 211 | } catch { 212 | Log("Error copying app to payload directory") 213 | cleanup(tempFolder); return 214 | } 215 | 216 | default: 217 | Log("Unsupported input file") 218 | cleanup(tempFolder) 219 | return 220 | } 221 | 222 | if !fileManager.fileExists(atPath: payloadDirectory){ 223 | Log("Payload directory doesn't exist") 224 | cleanup(tempFolder); return 225 | } 226 | 227 | // Loop through app bundles in payload directory 228 | do { 229 | let files = try fileManager.contentsOfDirectory(atPath: payloadDirectory) 230 | var isDirectory: ObjCBool = true 231 | 232 | for file in files { 233 | 234 | fileManager.fileExists(atPath: payloadDirectory.stringByAppendingPathComponent(file), isDirectory: &isDirectory) 235 | if !isDirectory.boolValue { continue } 236 | 237 | // MARK: Bundle variables setup 238 | appBundlePath = payloadDirectory.stringByAppendingPathComponent(file) 239 | appBundleInfoPlist = appBundlePath.stringByAppendingPathComponent("Info.plist") 240 | appBundleProvisioningFilePath = appBundlePath.stringByAppendingPathComponent("embedded.mobileprovision") 241 | let useAppBundleProfile = (provisioningFile == nil && fileManager.fileExists(atPath: appBundleProvisioningFilePath)) 242 | 243 | // MARK: Delete CFBundleResourceSpecification from Info.plist 244 | Log(Process().execute(defaultsPath, workingDirectory: nil, arguments: ["delete",appBundleInfoPlist,"CFBundleResourceSpecification"]).output) 245 | 246 | // MARK: Copy Provisioning Profile 247 | if provisioningFile != nil { 248 | if fileManager.fileExists(atPath: appBundleProvisioningFilePath) { 249 | Log("Deleting embedded.mobileprovision") 250 | do { 251 | try fileManager.removeItem(atPath: appBundleProvisioningFilePath) 252 | } catch let error as NSError { 253 | Log("Error deleting embedded.mobileprovision") 254 | Log(error.localizedDescription) 255 | cleanup(tempFolder); return 256 | } 257 | } 258 | print("Copying provisioning profile to app bundle") 259 | do { 260 | try fileManager.copyItem(atPath: provisioningFile!, toPath: appBundleProvisioningFilePath) 261 | } catch let error as NSError { 262 | Log("Error copying provisioning profile") 263 | Log(error.localizedDescription) 264 | cleanup(tempFolder); return 265 | } 266 | } 267 | 268 | // MARK: Generate entitlements.plist 269 | if provisioningFile != nil || useAppBundleProfile { 270 | print("Parsing entitlements") 271 | 272 | if let profile = ProvisioningProfile(filename: useAppBundleProfile ? appBundleProvisioningFilePath : provisioningFile!){ 273 | if let entitlements = profile.getEntitlementsPlist(tempFolder) { 274 | Log("–––––––––––––––––––––––\n\(entitlements)") 275 | Log("–––––––––––––––––––––––") 276 | do { 277 | try entitlements.write(toFile: entitlementsPlist, atomically: false, encoding: String.Encoding.utf8.rawValue) 278 | Log("Saved entitlements to \(entitlementsPlist)") 279 | } catch let error as NSError { 280 | Log("Error writing entitlements.plist, \(error.localizedDescription)") 281 | } 282 | } else { 283 | Log("Unable to read entitlements from provisioning profile") 284 | warnings += 1 285 | } 286 | if profile.appID != "*" && (newApplicationID != "" && newApplicationID != profile.appID) { 287 | Log("Unable to change App ID to \(newApplicationID), provisioning profile won't allow it") 288 | cleanup(tempFolder); return 289 | } 290 | } else { 291 | Log("Unable to parse provisioning profile, it may be corrupt") 292 | warnings += 1 293 | } 294 | 295 | } 296 | 297 | // MARK: Make sure that the executable is well... executable. 298 | if let bundleExecutable = getPlistKey(appBundleInfoPlist, keyName: "CFBundleExecutable") { 299 | appBundleExecutable = appBundlePath.stringByAppendingPathComponent(bundleExecutable) 300 | _ = Process().execute(chmodPath, workingDirectory: nil, arguments: ["755", appBundleExecutable]) 301 | } 302 | 303 | // MARK: Change Application ID 304 | if newApplicationID != "" { 305 | 306 | if let oldAppID = getPlistKey(appBundleInfoPlist, keyName: "CFBundleIdentifier") { 307 | 308 | func changeAppexID(_ appexFile: String){ 309 | 310 | func shortName(_ file: String, payloadDirectory: String) -> String { 311 | return file.substring(from: payloadDirectory.endIndex) 312 | } 313 | 314 | let appexPlist = appexFile.stringByAppendingPathComponent("Info.plist") 315 | if let appexBundleID = getPlistKey(appexPlist, keyName: "CFBundleIdentifier"){ 316 | let newAppexID = "\(newApplicationID)\(appexBundleID.substring(from: oldAppID.endIndex))" 317 | print("Changing \(shortName(appexFile, payloadDirectory: payloadDirectory)) id to \(newAppexID)") 318 | 319 | _ = setPlistKey(appexPlist, keyName: "CFBundleIdentifier", value: newAppexID) 320 | } 321 | if Process().execute(defaultsPath, workingDirectory: nil, arguments: ["read", appexPlist,"WKCompanionAppBundleIdentifier"]).status == 0 { 322 | _ = setPlistKey(appexPlist, keyName: "WKCompanionAppBundleIdentifier", value: newApplicationID) 323 | } 324 | recursiveDirectorySearch(appexFile, extensions: ["app"], found: changeAppexID) 325 | } 326 | 327 | recursiveDirectorySearch(appBundlePath, extensions: ["appex"], found: changeAppexID) 328 | } 329 | 330 | print("Changing App ID to \(newApplicationID)") 331 | let IDChangeTask = setPlistKey(appBundleInfoPlist, keyName: "CFBundleIdentifier", value: newApplicationID) 332 | if IDChangeTask.status != 0 { 333 | Log("Error changing App ID") 334 | Log(IDChangeTask.output) 335 | cleanup(tempFolder); return 336 | } 337 | 338 | 339 | } 340 | 341 | // MARK: Change Display Name 342 | if newDisplayName != "" { 343 | print("Changing Display Name to \(newDisplayName)") 344 | 345 | // change CFBundleDisplayName in Info.plist 346 | let displayNameChangeTask = self.setPlistKey(appBundleInfoPlist, keyName: "CFBundleDisplayName", value: newDisplayName) 347 | if displayNameChangeTask.status != 0 { 348 | Log("Error changing display name") 349 | Log(displayNameChangeTask.output) 350 | cleanup(tempFolder); return 351 | } 352 | 353 | // change CFBundleDisplayName in InfoPlist.strings in every *.lproj 354 | if let files = try? fileManager.contentsOfDirectory(atPath: appBundlePath) { 355 | for file in files { 356 | if file.pathExtension == "lproj" { 357 | let lprojPath = appBundlePath.stringByAppendingPathComponent(file) 358 | let infoPlistStringsPath = lprojPath.stringByAppendingPathComponent("InfoPlist.strings") 359 | 360 | let lprojDisplayNameChangeTask = self.plistBuddySet(infoPlistStringsPath, keyName: "CFBundleDisplayName", value: newDisplayName) 361 | if lprojDisplayNameChangeTask.status != 0 { 362 | Log("Error changing display name") 363 | Log(lprojDisplayNameChangeTask.output) 364 | cleanup(tempFolder); return 365 | } 366 | } 367 | } 368 | } 369 | } 370 | 371 | // MARK: Delete URL Schemes 372 | if deleteURLSchemes { 373 | let _ = self.plistBuddy(appBundleInfoPlist, command: "delete :CFBundleURLTypes") 374 | } 375 | 376 | func generateFileSignFunc(_ payloadDirectory: String, entitlementsPath: String, signingCertificate: String) -> ( (_ file: String) -> Void ) { 377 | 378 | let useEntitlements: Bool = ({ 379 | if fileManager.fileExists(atPath: entitlementsPath) { 380 | return true 381 | } 382 | return false 383 | })() 384 | 385 | func shortName(_ file: String, payloadDirectory: String) -> String { 386 | return file.substring(from: payloadDirectory.endIndex) 387 | } 388 | 389 | func beforeFunc(_ file: String, certificate: String, entitlements: String?) { 390 | print("Codesigning \(shortName(file, payloadDirectory: payloadDirectory))\(useEntitlements ? " with entitlements":"")") 391 | } 392 | 393 | func afterFunc(_ file: String, certificate: String, entitlements: String?, codesignOutput: AppSignerTaskOutput) { 394 | if codesignOutput.status != 0 { 395 | Log("Error codesigning \(shortName(file, payloadDirectory: payloadDirectory))") 396 | Log(codesignOutput.output) 397 | warnings += 1 398 | } 399 | } 400 | 401 | func output(_ file: String) { 402 | _ = codeSign(file, certificate: signingCertificate, entitlements: entitlementsPath, before: beforeFunc, after: afterFunc) 403 | } 404 | 405 | return output 406 | } 407 | 408 | // MARK: Codesigning - General 409 | let signableExtensions = ["dylib","so","0","vis","pvr","framework","appex","app"] 410 | 411 | // MARK: Codesigning - Eggs 412 | let eggSigningFunction = generateFileSignFunc(eggDirectory, entitlementsPath: entitlementsPlist, signingCertificate: signingCertificate) 413 | func signEgg(_ eggFile: String){ 414 | eggCount += 1 415 | 416 | let currentEggPath = eggDirectory.stringByAppendingPathComponent("egg\(eggCount)") 417 | let shortName = eggFile.substring(from: payloadDirectory.endIndex) 418 | Log("Extracting \(shortName)") 419 | if self.unzip(eggFile, outputPath: currentEggPath).status != 0 { 420 | Log("Error extracting \(shortName)") 421 | return 422 | } 423 | recursiveDirectorySearch(currentEggPath, extensions: ["egg"], found: signEgg) 424 | recursiveDirectorySearch(currentEggPath, extensions: signableExtensions, found: eggSigningFunction) 425 | Log("Compressing \(shortName)") 426 | _ = self.zip(currentEggPath, outputFile: eggFile) 427 | } 428 | 429 | recursiveDirectorySearch(appBundlePath, extensions: ["egg"], found: signEgg) 430 | 431 | // MARK: Codesigning - App 432 | let signingFunction = generateFileSignFunc(payloadDirectory, entitlementsPath: entitlementsPlist, signingCertificate: signingCertificate) 433 | 434 | 435 | recursiveDirectorySearch(appBundlePath, extensions: signableExtensions, found: signingFunction) 436 | signingFunction(appBundlePath) 437 | 438 | // MARK: Codesigning - Verification 439 | let verificationTask = Process().execute(codesignPath, workingDirectory: nil, arguments: ["-v",appBundlePath]) 440 | if verificationTask.status != 0 { 441 | Log("Error verifying code signature") 442 | Log(verificationTask.output) 443 | cleanup(tempFolder); return 444 | } 445 | } 446 | } catch let error as NSError { 447 | Log("Error listing files in payload directory") 448 | Log(error.localizedDescription) 449 | cleanup(tempFolder); return 450 | } 451 | 452 | // MARK: Packaging 453 | // Check if output already exists and delete if so 454 | if fileManager.fileExists(atPath: outputFile) { 455 | do { 456 | try fileManager.removeItem(atPath: outputFile) 457 | } catch let error as NSError { 458 | Log("Error deleting output file") 459 | Log(error.localizedDescription) 460 | cleanup(tempFolder); return 461 | } 462 | } 463 | print("Packaging IPA") 464 | let zipTask = self.zip(workingDirectory, outputFile: outputFile.lastPathComponent) 465 | if zipTask.status != 0 { 466 | Log("Error packaging IPA") 467 | } 468 | 469 | let cpTask = Process().execute(cpPath, workingDirectory: nil, arguments: [workingDirectory.stringByAppendingPathComponent(outputFile.lastPathComponent), outputFile]) 470 | if cpTask.status != 0 { 471 | Log("Error copy IPA") 472 | } 473 | 474 | // MARK: Cleanup 475 | cleanup(tempFolder) 476 | print("Done, output at \(outputFile)") 477 | } 478 | 479 | func makeTempFolder() -> String? { 480 | let tempTask = Process().execute(mktempPath, workingDirectory: nil, arguments: ["-d","-t",bundleID]) 481 | if tempTask.status != 0 { 482 | return nil 483 | } 484 | return tempTask.output.trim() 485 | } 486 | 487 | func cleanup(_ tempFolder: String) { 488 | do { 489 | Log("Deleting: \(tempFolder)") 490 | try fileManager.removeItem(atPath: tempFolder) 491 | } catch let error as NSError { 492 | Log("Unable to delete temp folder") 493 | Log(error.localizedDescription) 494 | } 495 | } 496 | 497 | func unzip(_ inputFile: String, outputPath: String) -> AppSignerTaskOutput { 498 | return Process().execute(unzipPath, workingDirectory: nil, arguments: ["-q",inputFile,"-d",outputPath]) 499 | } 500 | 501 | func zip(_ inputPath: String, outputFile: String) -> AppSignerTaskOutput { 502 | return Process().execute(zipPath, workingDirectory: inputPath, arguments: ["-qry", outputFile, "."]) 503 | } 504 | 505 | func getPlistKey(_ plist: String, keyName: String) -> String? { 506 | let currTask = Process().execute(defaultsPath, workingDirectory: nil, arguments: ["read", plist, keyName]) 507 | if currTask.status == 0 { 508 | return String(currTask.output.characters.dropLast()) 509 | } else { 510 | return nil 511 | } 512 | } 513 | 514 | func setPlistKey(_ plist: String, keyName: String, value: String) -> AppSignerTaskOutput { 515 | return Process().execute(defaultsPath, workingDirectory: nil, arguments: ["write", plist, keyName, value]) 516 | } 517 | 518 | func plistBuddySet(_ plist: String, keyName: String, value: String) -> AppSignerTaskOutput { 519 | return Process().execute(plistBuddyPath, workingDirectory: nil, arguments: ["-c", "set :\(keyName) \(value)", plist]) 520 | } 521 | 522 | func plistBuddy(_ plist: String, command: String) -> AppSignerTaskOutput { 523 | return Process().execute(plistBuddyPath, workingDirectory: nil, arguments: ["-c", command, plist]) 524 | } 525 | 526 | func recursiveDirectorySearch(_ path: String, extensions: [String], found: ((_ file: String) -> Void)){ 527 | 528 | if let files = try? fileManager.contentsOfDirectory(atPath: path) { 529 | var isDirectory: ObjCBool = true 530 | 531 | for file in files { 532 | let currentFile = path.stringByAppendingPathComponent(file) 533 | fileManager.fileExists(atPath: currentFile, isDirectory: &isDirectory) 534 | if isDirectory.boolValue { 535 | recursiveDirectorySearch(currentFile, extensions: extensions, found: found) 536 | } 537 | if extensions.contains(file.pathExtension) { 538 | found(currentFile) 539 | } 540 | 541 | } 542 | } 543 | } 544 | 545 | // MARK: Codesigning 546 | func codeSign(_ file: String, certificate: String, entitlements: String?, before: ((_ file: String, _ certificate: String, _ entitlements: String?)->Void)?, after: ((_ file: String, _ certificate: String, _ entitlements: String?, _ codesignTask: AppSignerTaskOutput)->Void)?) -> AppSignerTaskOutput { 547 | 548 | let useEntitlements: Bool = ({ 549 | if entitlements == nil { 550 | return false 551 | } else { 552 | if fileManager.fileExists(atPath: entitlements!) { 553 | return true 554 | } else { 555 | return false 556 | } 557 | } 558 | })() 559 | 560 | if let beforeFunc = before { 561 | beforeFunc(file, certificate, entitlements) 562 | } 563 | 564 | var arguments = ["-vvv","-fs",certificate,"--no-strict"] 565 | 566 | // bugfix: for there has only one architecture 567 | // specified architecture 568 | if file.hasSuffix(".app") { 569 | let fileTask = Process().execute(fileCmdPath, workingDirectory: nil, arguments: [appBundleExecutable]) 570 | let pattern = "for architecture (\\w+)" 571 | let regex = try! NSRegularExpression(pattern: pattern, options: .caseInsensitive) 572 | let res = regex.matches(in: fileTask.output, options: [], range: NSMakeRange(0, fileTask.output.characters.count)) 573 | 574 | if res.count == 1 { 575 | arguments.append("-a") 576 | let arch = (fileTask.output as NSString).substring(with: res[0].rangeAt(1)) 577 | arguments.append(arch) 578 | } 579 | } 580 | 581 | if useEntitlements { 582 | arguments.append("--entitlements=\(entitlements!)") 583 | } 584 | arguments.append(file) 585 | 586 | let codesignTask = Process().execute(codesignPath, workingDirectory: nil, arguments: arguments) 587 | if let afterFunc = after { 588 | afterFunc(file, certificate, entitlements, codesignTask) 589 | } 590 | return codesignTask 591 | } 592 | } 593 | -------------------------------------------------------------------------------- /AppResign/AppResign/Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Extension.swift 3 | // AppResign 4 | // 5 | // Created by Eular on 6/7/16. 6 | // Copyright © 2016 Eular. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | var LogMode = false 12 | func Log(_ message: T, file: String = #file, function: String = #function, line: Int = #line) { 13 | if LogMode { 14 | let formatter = DateFormatter() 15 | formatter.dateFormat = "yyyy-MM-dd HH:mm:ss" 16 | 17 | print("\(formatter.string(from: Date())) \(file.lastPathComponent)[\(line)], \(function): \(message)") 18 | } 19 | } 20 | 21 | struct AppSignerTaskOutput { 22 | var output: String 23 | var status: Int32 24 | init(status: Int32, output: String){ 25 | self.status = status 26 | self.output = output 27 | } 28 | } 29 | 30 | extension Process { 31 | func launchSyncronous() -> AppSignerTaskOutput { 32 | self.standardInput = FileHandle.nullDevice 33 | let pipe = Pipe() 34 | self.standardOutput = pipe 35 | self.standardError = pipe 36 | let pipeFile = pipe.fileHandleForReading 37 | self.launch() 38 | 39 | let data = NSMutableData() 40 | while self.isRunning { 41 | data.append(pipeFile.availableData) 42 | } 43 | 44 | let output = NSString(data: data as Data, encoding: String.Encoding.utf8.rawValue) as! String 45 | 46 | return AppSignerTaskOutput(status: self.terminationStatus, output: output) 47 | 48 | } 49 | 50 | func execute(_ launchPath: String, workingDirectory: String?, arguments: [String]?)->AppSignerTaskOutput{ 51 | self.launchPath = launchPath 52 | if arguments != nil { 53 | self.arguments = arguments 54 | } 55 | if workingDirectory != nil { 56 | self.currentDirectoryPath = workingDirectory! 57 | } 58 | return self.launchSyncronous() 59 | } 60 | 61 | } 62 | 63 | extension String { 64 | 65 | var lastPathComponent: String { 66 | 67 | get { 68 | return (self as NSString).lastPathComponent 69 | } 70 | } 71 | var pathExtension: String { 72 | 73 | get { 74 | 75 | return (self as NSString).pathExtension 76 | } 77 | } 78 | var stringByDeletingLastPathComponent: String { 79 | 80 | get { 81 | 82 | return (self as NSString).deletingLastPathComponent 83 | } 84 | } 85 | var stringByDeletingPathExtension: String { 86 | 87 | get { 88 | 89 | return (self as NSString).deletingPathExtension 90 | } 91 | } 92 | var pathComponents: [String] { 93 | 94 | get { 95 | 96 | return (self as NSString).pathComponents 97 | } 98 | } 99 | 100 | func stringByAppendingPathComponent(_ path: String) -> String { 101 | 102 | let nsSt = self as NSString 103 | 104 | return nsSt.appendingPathComponent(path) 105 | } 106 | 107 | func stringByAppendingPathExtension(_ ext: String) -> String? { 108 | 109 | let nsSt = self as NSString 110 | 111 | return nsSt.appendingPathExtension(ext) 112 | } 113 | 114 | func trim() -> String { 115 | return self.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /AppResign/AppResign/ProvisioningProfile.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProvisioningProfile.swift 3 | // AppResign 4 | // 5 | // Created by Eular on 6/7/16. 6 | // Copyright © 2016 Eular. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct ProvisioningProfile { 12 | 13 | var filename: String, 14 | name: String, 15 | created: Date, 16 | expires: Date, 17 | appID: String, 18 | teamID: String, 19 | rawXML: String, 20 | entitlements: AnyObject? 21 | 22 | static func getProfiles() -> [ProvisioningProfile] { 23 | var output: [ProvisioningProfile] = [] 24 | 25 | let fileManager = FileManager() 26 | if let libraryDirectory = fileManager.urls(for: .libraryDirectory, in: .userDomainMask).first { 27 | let libraryPath = libraryDirectory.path 28 | let provisioningProfilesPath = libraryPath.stringByAppendingPathComponent("MobileDevice/Provisioning Profiles") as NSString 29 | 30 | if let provisioningProfiles = try? fileManager.contentsOfDirectory(atPath: provisioningProfilesPath as String) { 31 | for provFile in provisioningProfiles { 32 | if provFile.pathExtension == "mobileprovision" { 33 | let profileFilename = provisioningProfilesPath.appendingPathComponent(provFile) 34 | if let profile = ProvisioningProfile(filename: profileFilename) { 35 | output.append(profile) 36 | } 37 | } 38 | } 39 | } 40 | } 41 | 42 | return output 43 | } 44 | 45 | init?(filename: String){ 46 | let securityArgs = ["cms","-D","-i", filename] 47 | 48 | let taskOutput = Process().execute("/usr/bin/security", workingDirectory: nil, arguments: securityArgs) 49 | if taskOutput.status == 0 { 50 | 51 | // here is a bug on macOS 52 | // taskOutput.output has a error info in the first line: 53 | // security: SecPolicySetValue: One or more parameters passed to a function were not valid. 54 | // the following is dirty fix 55 | if taskOutput.output.hasPrefix("security:") { 56 | let error_str = "security: SecPolicySetValue: One or more parameters passed to a function were not valid.\n" 57 | self.rawXML = taskOutput.output.replacingOccurrences(of: error_str, with: "") 58 | } else { 59 | self.rawXML = taskOutput.output 60 | } 61 | 62 | if let results = try? PropertyListSerialization.propertyList(from: self.rawXML.data(using: String.Encoding.utf8)!, options: PropertyListSerialization.MutabilityOptions(), format: nil) as AnyObject { 63 | 64 | if let expirationDate = results.value(forKey: "ExpirationDate") as? Date, 65 | let creationDate = results.value(forKey: "CreationDate") as? Date, 66 | let name = results.value(forKey: "Name") as? String, 67 | let entitlements = results.value(forKey: "Entitlements"), 68 | let applicationIdentifier = (entitlements as AnyObject).value(forKey: "application-identifier") as? String, 69 | let periodIndex = applicationIdentifier.characters.index(of: ".") { 70 | 71 | self.filename = filename 72 | self.expires = expirationDate 73 | self.created = creationDate 74 | self.appID = applicationIdentifier.substring(from: applicationIdentifier.index(periodIndex, offsetBy: 1)) 75 | self.teamID = applicationIdentifier.substring(to: periodIndex) 76 | self.name = name 77 | self.entitlements = entitlements as AnyObject? 78 | 79 | } else { 80 | Log("Error processing \(filename.lastPathComponent)") 81 | return nil 82 | } 83 | 84 | } else { 85 | Log("Error parsing \(filename.lastPathComponent)") 86 | return nil 87 | } 88 | 89 | } else { 90 | Log("Error reading \(filename.lastPathComponent)") 91 | return nil 92 | } 93 | } 94 | 95 | func getEntitlementsPlist(_ tempFolder: String) -> NSString? { 96 | let mobileProvisionPlist = tempFolder.stringByAppendingPathComponent("mobileprovision.plist") 97 | do { 98 | try self.rawXML.write(toFile: mobileProvisionPlist, atomically: false, encoding: String.Encoding.utf8) 99 | let plistBuddy = Process().execute("/usr/libexec/PlistBuddy", workingDirectory: nil, arguments: ["-c", "Print :Entitlements", mobileProvisionPlist, "-x"]) 100 | if plistBuddy.status == 0 { 101 | return plistBuddy.output as NSString? 102 | } else { 103 | Log("PlistBuddy Failed") 104 | Log(plistBuddy.output) 105 | return nil 106 | } 107 | } catch let error as NSError { 108 | Log("Error writing mobileprovision.plist") 109 | Log(error.localizedDescription) 110 | return nil 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /AppResign/AppResign/main.swift: -------------------------------------------------------------------------------- 1 | // 2 | // main.swift 3 | // AppResign 4 | // 5 | // Created by Eular on 6/7/16. 6 | // Copyright © 2016 Eular. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | let argv = CommandLine.arguments 12 | let appName = argv[0].pathComponents.last! 13 | LogMode = false 14 | 15 | func Usage() { 16 | print("Version: 2.2.1\n") 17 | print("Usage:") 18 | print("./\(appName) [-options] [INPUT] [OUTPUT]") 19 | print("\nOptions:") 20 | print("-h \t help") 21 | print("-v \t verbose mode, print all logs") 22 | print("-c \t certificate") 23 | print("-p \t provisioning profile") 24 | print("-b \t bundle id") 25 | print("-n \t display name, '*' means default name") 26 | print("\nExample:") 27 | print("./\(appName) xxx.ipa xxx-out.ipa") 28 | print("./\(appName) -v xxx.ipa xxx-out.ipa") 29 | print("./\(appName) -v -c 'iPhone Developer: XXX XXX (ABCDE12345)' -p 'iOS Team Provisioning Profile: com.xxx.xxx (ABCDE12345)' -b 'com.xxx.xxx' -n '*' xxx.ipa xxx-out.ipa") 30 | exit(1) 31 | } 32 | 33 | // deprecated 34 | //func raw_input(_ prompt: String = "> ") -> String { 35 | // print(prompt, terminator:"") 36 | // var input: String = "" 37 | // 38 | // while true { 39 | // let c = Character(UnicodeScalar(UInt32(fgetc(stdin)))!) 40 | // if c == "\n" { 41 | // return input 42 | // } else { 43 | // input.append(c) 44 | // } 45 | // } 46 | //} 47 | 48 | func raw_input(_ prompt: String = "> ") -> String { 49 | print(prompt, terminator:"") 50 | return readLine(strippingNewline: true) ?? "" 51 | } 52 | 53 | 54 | func mainRoutine(_ input: String, output: String, certificate: String, provProfile: String, bundleId: String, displayName: String) { 55 | let support = ["deb", "ipa", "app", "xcarchive"] 56 | if support.contains(input.pathExtension) { 57 | if output.pathExtension == "ipa" { 58 | let appResign = AppResign() 59 | 60 | print("=============================") 61 | print("[*] Configure Resigning") 62 | // Show signing ceritificates 63 | print("Choose Signing Ceritificate:") 64 | var n = appResign.codesigningCerts.count 65 | for i in 0..= 0) && (r! < n) { 88 | appResign.curSigningCert = appResign.codesigningCerts[r!] 89 | print("Use Certificate: \(appResign.curSigningCert)\n") 90 | break 91 | } else { 92 | print("Please input number 0-\(n-1)") 93 | } 94 | } 95 | } 96 | 97 | // Show provisioning profiles 98 | print("Choose Provisioning Profile:") 99 | n = appResign.provisioningProfiles.count 100 | for i in 0..= 0 && r! < n { 130 | profile = appResign.provisioningProfiles[r!] 131 | appResign.profileFilename = profile!.filename 132 | print("Use Profile: \(profile!.name) (\(profile!.teamID))") 133 | print("Position: \(profile!.filename)\n") 134 | break 135 | } else { 136 | print("Please input number 0-\(n-1)") 137 | } 138 | } 139 | } 140 | 141 | // Set app bundle ID 142 | if profile!.appID.characters.index(of: "*") == nil { 143 | // Not a wildcard profile 144 | appResign.newApplicationID = profile!.appID 145 | print("Use default bundle ID: \(profile!.appID)\n") 146 | } else if (!bundleId.isEmpty) { 147 | appResign.newApplicationID = bundleId 148 | print("Use bundle ID: \(bundleId)\n") 149 | } else { 150 | let r = raw_input("Set App Bundle ID: ") 151 | if !r.isEmpty { 152 | appResign.newApplicationID = r 153 | } 154 | print() 155 | } 156 | 157 | // Set app display name 158 | if (!displayName.isEmpty) { 159 | if (displayName == "*") { 160 | print("Use default display name.") 161 | } else { 162 | appResign.newDisplayName = displayName 163 | print("Use App Display Name: \(displayName)\n") 164 | } 165 | } else { 166 | let r = raw_input("Set App Display Name: ") 167 | if !r.isEmpty { 168 | appResign.newDisplayName = r 169 | } 170 | } 171 | 172 | // If delete url schemes 173 | let deleteQuery = raw_input("Delete url schemes (y/n): ") 174 | if !deleteQuery.isEmpty && deleteQuery == "y" { 175 | appResign.deleteURLSchemes = true 176 | } 177 | 178 | print("=============================") 179 | 180 | // Start signing 181 | print("[*] Start Resigning App") 182 | appResign.startSigning(input, output: output) 183 | 184 | } else { 185 | print("[*] Error! \nOnly support output ipa file.") 186 | } 187 | } else { 188 | print("[*] Error! \nThis tool can only support input file with format: \(support.joined(separator: ", ")).") 189 | } 190 | } 191 | 192 | if (argv.count < 3 || argv.count > 12) { 193 | Usage() 194 | } 195 | 196 | var certificate = "" 197 | var provProfile = "" 198 | var bundleId = "" 199 | var displayName = "" 200 | var i = 1 201 | while (i < argv.count - 2) { 202 | switch (argv[i]) { 203 | case "-v": 204 | LogMode = true 205 | case "-c": 206 | i += 1 207 | certificate = argv[i] 208 | case "-p": 209 | i += 1 210 | provProfile = argv[i] 211 | case "-b": 212 | i += 1 213 | bundleId = argv[i] 214 | case "-n": 215 | i += 1 216 | displayName = argv[i] 217 | default: 218 | Usage() 219 | } 220 | i += 1 221 | } 222 | let input = argv[argv.count - 2] 223 | let output = argv[argv.count - 1] 224 | 225 | mainRoutine(input, output: output, certificate: certificate, provProfile: provProfile, bundleId: bundleId, displayName: displayName) 226 | 227 | 228 | -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript-Reveal.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | BBDB00031D2EF8B60096EB26 /* Cycript_Reveal.mm in Sources */ = {isa = PBXBuildFile; fileRef = BBDB00021D2EF8B60096EB26 /* Cycript_Reveal.mm */; }; 11 | BBDB000E1D2EFA1B0096EB26 /* Cycript.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBDB000D1D2EFA1B0096EB26 /* Cycript.framework */; }; 12 | BBDB00101D2EFA370096EB26 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBDB000F1D2EFA370096EB26 /* JavaScriptCore.framework */; }; 13 | BBDB00121D2EFA500096EB26 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = BBDB00111D2EFA500096EB26 /* libsqlite3.0.tbd */; }; 14 | BBDB00141D2EFA5A0096EB26 /* libstdc++.6.0.9.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = BBDB00131D2EFA5A0096EB26 /* libstdc++.6.0.9.tbd */; }; 15 | BBDB00181D2EFB070096EB26 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBDB00171D2EFB070096EB26 /* UIKit.framework */; }; 16 | BBDB001A1D2EFB170096EB26 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBDB00191D2EFB160096EB26 /* CoreGraphics.framework */; }; 17 | BBDB001C1D2EFB240096EB26 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBDB001B1D2EFB240096EB26 /* CFNetwork.framework */; }; 18 | BBDB001E1D2EFB2C0096EB26 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBDB001D1D2EFB2C0096EB26 /* QuartzCore.framework */; }; 19 | BBDB00201D2EFB3F0096EB26 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = BBDB001F1D2EFB3F0096EB26 /* libz.tbd */; }; 20 | BBDBFFF91D2EF8B60096EB26 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBDBFFF81D2EF8B60096EB26 /* Foundation.framework */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | BBDB00001D2EF8B60096EB26 /* PackageVersion.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PackageVersion.plist; sourceTree = ""; }; 25 | BBDB00011D2EF8B60096EB26 /* Cycript-Reveal-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Cycript-Reveal-Prefix.pch"; sourceTree = ""; }; 26 | BBDB00021D2EF8B60096EB26 /* Cycript_Reveal.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = Cycript_Reveal.mm; sourceTree = ""; }; 27 | BBDB00071D2EF8B60096EB26 /* Cycript_Reveal.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Cycript_Reveal.plist; path = Package/Library/MobileSubstrate/DynamicLibraries/Cycript_Reveal.plist; sourceTree = ""; }; 28 | BBDB000D1D2EFA1B0096EB26 /* Cycript.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Cycript.framework; sourceTree = ""; }; 29 | BBDB000F1D2EFA370096EB26 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 30 | BBDB00111D2EFA500096EB26 /* libsqlite3.0.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.0.tbd; path = usr/lib/libsqlite3.0.tbd; sourceTree = SDKROOT; }; 31 | BBDB00131D2EFA5A0096EB26 /* libstdc++.6.0.9.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libstdc++.6.0.9.tbd"; path = "usr/lib/libstdc++.6.0.9.tbd"; sourceTree = SDKROOT; }; 32 | BBDB00151D2EFAEB0096EB26 /* Reveal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Reveal.framework; sourceTree = ""; }; 33 | BBDB00171D2EFB070096EB26 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 34 | BBDB00191D2EFB160096EB26 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 35 | BBDB001B1D2EFB240096EB26 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 36 | BBDB001D1D2EFB2C0096EB26 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 37 | BBDB001F1D2EFB3F0096EB26 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; 38 | BBDBFFF51D2EF8B60096EB26 /* Cycript-Reveal.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "Cycript-Reveal.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | BBDBFFF81D2EF8B60096EB26 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 40 | BBDBFFFD1D2EF8B60096EB26 /* control.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = control.txt; path = Package/DEBIAN/control.txt; sourceTree = ""; }; 41 | BBDBFFFE1D2EF8B60096EB26 /* control */ = {isa = PBXFileReference; lastKnownFileType = text; name = control; path = Package/DEBIAN/control; sourceTree = ""; }; 42 | /* End PBXFileReference section */ 43 | 44 | /* Begin PBXFrameworksBuildPhase section */ 45 | BBDBFFF11D2EF8B60096EB26 /* Frameworks */ = { 46 | isa = PBXFrameworksBuildPhase; 47 | buildActionMask = 2147483647; 48 | files = ( 49 | BBDB00201D2EFB3F0096EB26 /* libz.tbd in Frameworks */, 50 | BBDB001E1D2EFB2C0096EB26 /* QuartzCore.framework in Frameworks */, 51 | BBDB001C1D2EFB240096EB26 /* CFNetwork.framework in Frameworks */, 52 | BBDB001A1D2EFB170096EB26 /* CoreGraphics.framework in Frameworks */, 53 | BBDB00181D2EFB070096EB26 /* UIKit.framework in Frameworks */, 54 | BBDB00141D2EFA5A0096EB26 /* libstdc++.6.0.9.tbd in Frameworks */, 55 | BBDB00121D2EFA500096EB26 /* libsqlite3.0.tbd in Frameworks */, 56 | BBDB00101D2EFA370096EB26 /* JavaScriptCore.framework in Frameworks */, 57 | BBDBFFF91D2EF8B60096EB26 /* Foundation.framework in Frameworks */, 58 | BBDB000E1D2EFA1B0096EB26 /* Cycript.framework in Frameworks */, 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | /* End PBXFrameworksBuildPhase section */ 63 | 64 | /* Begin PBXGroup section */ 65 | BBDB00041D2EF8B60096EB26 /* Library */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | BBDB00051D2EF8B60096EB26 /* MobileSubstrate */, 69 | ); 70 | name = Library; 71 | sourceTree = ""; 72 | }; 73 | BBDB00051D2EF8B60096EB26 /* MobileSubstrate */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | BBDB00061D2EF8B60096EB26 /* DynamicLibraries */, 77 | ); 78 | name = MobileSubstrate; 79 | sourceTree = ""; 80 | }; 81 | BBDB00061D2EF8B60096EB26 /* DynamicLibraries */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | BBDB00071D2EF8B60096EB26 /* Cycript_Reveal.plist */, 85 | ); 86 | name = DynamicLibraries; 87 | sourceTree = ""; 88 | }; 89 | BBDBFFEB1D2EF8B60096EB26 = { 90 | isa = PBXGroup; 91 | children = ( 92 | BBDBFFFA1D2EF8B60096EB26 /* Cycript-Reveal */, 93 | BBDBFFF71D2EF8B60096EB26 /* Frameworks */, 94 | BBDBFFF61D2EF8B60096EB26 /* Products */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | BBDBFFF61D2EF8B60096EB26 /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | BBDBFFF51D2EF8B60096EB26 /* Cycript-Reveal.dylib */, 102 | ); 103 | name = Products; 104 | sourceTree = ""; 105 | }; 106 | BBDBFFF71D2EF8B60096EB26 /* Frameworks */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | BBDB001F1D2EFB3F0096EB26 /* libz.tbd */, 110 | BBDB001D1D2EFB2C0096EB26 /* QuartzCore.framework */, 111 | BBDB001B1D2EFB240096EB26 /* CFNetwork.framework */, 112 | BBDB00191D2EFB160096EB26 /* CoreGraphics.framework */, 113 | BBDB00171D2EFB070096EB26 /* UIKit.framework */, 114 | BBDB00151D2EFAEB0096EB26 /* Reveal.framework */, 115 | BBDB00131D2EFA5A0096EB26 /* libstdc++.6.0.9.tbd */, 116 | BBDB00111D2EFA500096EB26 /* libsqlite3.0.tbd */, 117 | BBDB000F1D2EFA370096EB26 /* JavaScriptCore.framework */, 118 | BBDB000D1D2EFA1B0096EB26 /* Cycript.framework */, 119 | BBDBFFF81D2EF8B60096EB26 /* Foundation.framework */, 120 | ); 121 | name = Frameworks; 122 | sourceTree = ""; 123 | }; 124 | BBDBFFFA1D2EF8B60096EB26 /* Cycript-Reveal */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | BBDB00021D2EF8B60096EB26 /* Cycript_Reveal.mm */, 128 | BBDBFFFB1D2EF8B60096EB26 /* Package */, 129 | BBDBFFFF1D2EF8B60096EB26 /* Supporting Files */, 130 | ); 131 | path = "Cycript-Reveal"; 132 | sourceTree = ""; 133 | }; 134 | BBDBFFFB1D2EF8B60096EB26 /* Package */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | BBDBFFFC1D2EF8B60096EB26 /* DEBIAN */, 138 | BBDB00041D2EF8B60096EB26 /* Library */, 139 | ); 140 | name = Package; 141 | sourceTree = ""; 142 | }; 143 | BBDBFFFC1D2EF8B60096EB26 /* DEBIAN */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | BBDBFFFD1D2EF8B60096EB26 /* control.txt */, 147 | BBDBFFFE1D2EF8B60096EB26 /* control */, 148 | ); 149 | name = DEBIAN; 150 | sourceTree = ""; 151 | }; 152 | BBDBFFFF1D2EF8B60096EB26 /* Supporting Files */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | BBDB00001D2EF8B60096EB26 /* PackageVersion.plist */, 156 | BBDB00011D2EF8B60096EB26 /* Cycript-Reveal-Prefix.pch */, 157 | ); 158 | name = "Supporting Files"; 159 | sourceTree = ""; 160 | }; 161 | /* End PBXGroup section */ 162 | 163 | /* Begin PBXHeadersBuildPhase section */ 164 | BBDBFFF21D2EF8B60096EB26 /* Headers */ = { 165 | isa = PBXHeadersBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | ); 169 | runOnlyForDeploymentPostprocessing = 0; 170 | }; 171 | /* End PBXHeadersBuildPhase section */ 172 | 173 | /* Begin PBXNativeTarget section */ 174 | BBDBFFF41D2EF8B60096EB26 /* Cycript-Reveal */ = { 175 | isa = PBXNativeTarget; 176 | buildConfigurationList = BBDB000A1D2EF8B60096EB26 /* Build configuration list for PBXNativeTarget "Cycript-Reveal" */; 177 | buildPhases = ( 178 | BBDBFFF01D2EF8B60096EB26 /* Sources */, 179 | BBDBFFF11D2EF8B60096EB26 /* Frameworks */, 180 | BBDBFFF21D2EF8B60096EB26 /* Headers */, 181 | BBDBFFF31D2EF8B60096EB26 /* ShellScript */, 182 | ); 183 | buildRules = ( 184 | ); 185 | dependencies = ( 186 | ); 187 | name = "Cycript-Reveal"; 188 | productName = "Cycript-Reveal"; 189 | productReference = BBDBFFF51D2EF8B60096EB26 /* Cycript-Reveal.dylib */; 190 | productType = "com.apple.product-type.library.dynamic"; 191 | }; 192 | /* End PBXNativeTarget section */ 193 | 194 | /* Begin PBXProject section */ 195 | BBDBFFEC1D2EF8B60096EB26 /* Project object */ = { 196 | isa = PBXProject; 197 | attributes = { 198 | LastUpgradeCheck = 0800; 199 | TargetAttributes = { 200 | BBDBFFF41D2EF8B60096EB26 = { 201 | CreatedOnToolsVersion = 8.0; 202 | DevelopmentTeam = 952J324HNJ; 203 | DevelopmentTeamName = "Eular Uri (Personal Team)"; 204 | ProvisioningStyle = Automatic; 205 | }; 206 | }; 207 | }; 208 | buildConfigurationList = BBDBFFEF1D2EF8B60096EB26 /* Build configuration list for PBXProject "Cycript-Reveal" */; 209 | compatibilityVersion = "Xcode 3.2"; 210 | developmentRegion = English; 211 | hasScannedForEncodings = 0; 212 | knownRegions = ( 213 | en, 214 | ); 215 | mainGroup = BBDBFFEB1D2EF8B60096EB26; 216 | productRefGroup = BBDBFFF61D2EF8B60096EB26 /* Products */; 217 | projectDirPath = ""; 218 | projectRoot = ""; 219 | targets = ( 220 | BBDBFFF41D2EF8B60096EB26 /* Cycript-Reveal */, 221 | ); 222 | }; 223 | /* End PBXProject section */ 224 | 225 | /* Begin PBXShellScriptBuildPhase section */ 226 | BBDBFFF31D2EF8B60096EB26 /* ShellScript */ = { 227 | isa = PBXShellScriptBuildPhase; 228 | buildActionMask = 2147483647; 229 | files = ( 230 | ); 231 | inputPaths = ( 232 | ); 233 | outputPaths = ( 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | shellPath = /bin/sh; 237 | shellScript = "/opt/iOSOpenDev/bin/iosod --xcbp"; 238 | }; 239 | /* End PBXShellScriptBuildPhase section */ 240 | 241 | /* Begin PBXSourcesBuildPhase section */ 242 | BBDBFFF01D2EF8B60096EB26 /* Sources */ = { 243 | isa = PBXSourcesBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | BBDB00031D2EF8B60096EB26 /* Cycript_Reveal.mm in Sources */, 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | }; 250 | /* End PBXSourcesBuildPhase section */ 251 | 252 | /* Begin XCBuildConfiguration section */ 253 | BBDB00081D2EF8B60096EB26 /* Debug */ = { 254 | isa = XCBuildConfiguration; 255 | buildSettings = { 256 | COPY_PHASE_STRIP = NO; 257 | EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.gch (*) .DS_Store CVS .svn .git .hg *.xcodeproj *.xcode *.pbproj *.pbxproj"; 258 | FRAMEWORK_SEARCH_PATHS = ( 259 | "$(iOSOpenDevPath)/frameworks/**", 260 | "$(SDKROOT)/System/Library/PrivateFrameworks", 261 | ); 262 | GCC_C_LANGUAGE_STANDARD = gnu99; 263 | GCC_DYNAMIC_NO_PIC = NO; 264 | GCC_OPTIMIZATION_LEVEL = 0; 265 | GCC_PREPROCESSOR_DEFINITIONS = ( 266 | "DEBUG=1", 267 | "$(inherited)", 268 | ); 269 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 270 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 271 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 272 | GCC_WARN_UNUSED_VARIABLE = YES; 273 | HEADER_SEARCH_PATHS = "$(iOSOpenDevPath)/include/**"; 274 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 275 | LIBRARY_SEARCH_PATHS = "$(iOSOpenDevPath)/lib/**"; 276 | SDKROOT = iphoneos; 277 | TARGETED_DEVICE_FAMILY = "1,2"; 278 | VALIDATE_PRODUCT = NO; 279 | iOSOpenDevPath = /opt/iOSOpenDev; 280 | }; 281 | name = Debug; 282 | }; 283 | BBDB00091D2EF8B60096EB26 /* Release */ = { 284 | isa = XCBuildConfiguration; 285 | buildSettings = { 286 | COPY_PHASE_STRIP = YES; 287 | EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.gch (*) .DS_Store CVS .svn .git .hg *.xcodeproj *.xcode *.pbproj *.pbxproj"; 288 | FRAMEWORK_SEARCH_PATHS = ( 289 | "$(iOSOpenDevPath)/frameworks/**", 290 | "$(SDKROOT)/System/Library/PrivateFrameworks", 291 | ); 292 | GCC_C_LANGUAGE_STANDARD = gnu99; 293 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 294 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | HEADER_SEARCH_PATHS = "$(iOSOpenDevPath)/include/**"; 297 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 298 | LIBRARY_SEARCH_PATHS = "$(iOSOpenDevPath)/lib/**"; 299 | SDKROOT = iphoneos; 300 | TARGETED_DEVICE_FAMILY = "1,2"; 301 | VALIDATE_PRODUCT = YES; 302 | iOSOpenDevPath = /opt/iOSOpenDev; 303 | }; 304 | name = Release; 305 | }; 306 | BBDB000B1D2EF8B60096EB26 /* Debug */ = { 307 | isa = XCBuildConfiguration; 308 | buildSettings = { 309 | CODE_SIGN_IDENTITY = "iPhone Developer"; 310 | DYLIB_COMPATIBILITY_VERSION = 1; 311 | DYLIB_CURRENT_VERSION = 1; 312 | ENABLE_BITCODE = NO; 313 | FRAMEWORK_SEARCH_PATHS = ( 314 | "$(inherited)", 315 | "$(PROJECT_DIR)", 316 | ); 317 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 318 | GCC_PREFIX_HEADER = "Cycript-Reveal/Cycript-Reveal-Prefix.pch"; 319 | INSTALL_PATH = /Library/MobileSubstrate/DynamicLibraries; 320 | OTHER_LDFLAGS = ( 321 | "-ObjC", 322 | "-lz", 323 | "-framework", 324 | Reveal, 325 | ); 326 | PRODUCT_NAME = "$(TARGET_NAME)"; 327 | iOSOpenDevBuildPackageOnAnyBuild = NO; 328 | iOSOpenDevCopyOnBuild = NO; 329 | iOSOpenDevDevice = ""; 330 | iOSOpenDevInstallOnAnyBuild = NO; 331 | iOSOpenDevInstallOnProfiling = YES; 332 | iOSOpenDevRespringOnInstall = YES; 333 | iOSOpenDevUsePackageVersionPList = YES; 334 | }; 335 | name = Debug; 336 | }; 337 | BBDB000C1D2EF8B60096EB26 /* Release */ = { 338 | isa = XCBuildConfiguration; 339 | buildSettings = { 340 | CODE_SIGN_IDENTITY = "iPhone Developer"; 341 | DYLIB_COMPATIBILITY_VERSION = 1; 342 | DYLIB_CURRENT_VERSION = 1; 343 | ENABLE_BITCODE = NO; 344 | FRAMEWORK_SEARCH_PATHS = ( 345 | "$(inherited)", 346 | "$(PROJECT_DIR)", 347 | ); 348 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 349 | GCC_PREFIX_HEADER = "Cycript-Reveal/Cycript-Reveal-Prefix.pch"; 350 | INSTALL_PATH = /Library/MobileSubstrate/DynamicLibraries; 351 | OTHER_LDFLAGS = ( 352 | "-ObjC", 353 | "-lz", 354 | "-framework", 355 | Reveal, 356 | ); 357 | PRODUCT_NAME = "$(TARGET_NAME)"; 358 | iOSOpenDevBuildPackageOnAnyBuild = NO; 359 | iOSOpenDevCopyOnBuild = NO; 360 | iOSOpenDevDevice = ""; 361 | iOSOpenDevInstallOnAnyBuild = NO; 362 | iOSOpenDevInstallOnProfiling = YES; 363 | iOSOpenDevRespringOnInstall = YES; 364 | iOSOpenDevUsePackageVersionPList = YES; 365 | }; 366 | name = Release; 367 | }; 368 | /* End XCBuildConfiguration section */ 369 | 370 | /* Begin XCConfigurationList section */ 371 | BBDB000A1D2EF8B60096EB26 /* Build configuration list for PBXNativeTarget "Cycript-Reveal" */ = { 372 | isa = XCConfigurationList; 373 | buildConfigurations = ( 374 | BBDB000B1D2EF8B60096EB26 /* Debug */, 375 | BBDB000C1D2EF8B60096EB26 /* Release */, 376 | ); 377 | defaultConfigurationIsVisible = 0; 378 | }; 379 | BBDBFFEF1D2EF8B60096EB26 /* Build configuration list for PBXProject "Cycript-Reveal" */ = { 380 | isa = XCConfigurationList; 381 | buildConfigurations = ( 382 | BBDB00081D2EF8B60096EB26 /* Debug */, 383 | BBDB00091D2EF8B60096EB26 /* Release */, 384 | ); 385 | defaultConfigurationIsVisible = 0; 386 | defaultConfigurationName = Release; 387 | }; 388 | /* End XCConfigurationList section */ 389 | }; 390 | rootObject = BBDBFFEC1D2EF8B60096EB26 /* Project object */; 391 | } 392 | -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript-Reveal.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript-Reveal.xcodeproj/project.xcworkspace/xcuserdata/eular.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Cycript-Reveal/Cycript-Reveal.xcodeproj/project.xcworkspace/xcuserdata/eular.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript-Reveal.xcodeproj/xcuserdata/eular.xcuserdatad/xcschemes/Cycript-Reveal.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript-Reveal.xcodeproj/xcuserdata/eular.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Cycript-Reveal.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | BBDBFFF41D2EF8B60096EB26 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript-Reveal/Cycript-Reveal-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Cycript-Reveal' target in the 'Cycript-Reveal' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript-Reveal/Cycript_Reveal.mm: -------------------------------------------------------------------------------- 1 | // 2 | // Cycript_Reveal.mm 3 | // Cycript-Reveal 4 | // 5 | // Created by Eular on 7/8/16. 6 | // Copyright (c) 2016 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #define CYCRIPT_PORT 8888 13 | 14 | CHDeclareClass(UIApplication); 15 | CHDeclareClass(MicroMessengerAppDelegate); 16 | 17 | CHOptimizedMethod2(self, void, MicroMessengerAppDelegate, application, UIApplication *, application, didFinishLaunchingWithOptions, NSDictionary *, options) 18 | { 19 | CHSuper2(MicroMessengerAppDelegate, application, application, didFinishLaunchingWithOptions, options); 20 | 21 | NSLog(@"## Start Cycript ##"); 22 | CYListenServer(CYCRIPT_PORT); 23 | } 24 | 25 | 26 | CHConstructor { 27 | @autoreleasepool { 28 | NSLog(@"## Start Reveal ##"); 29 | 30 | CHLoadLateClass(MicroMessengerAppDelegate); 31 | CHHook2(MicroMessengerAppDelegate, application, didFinishLaunchingWithOptions); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript-Reveal/Package/DEBIAN/control: -------------------------------------------------------------------------------- 1 | Package: com.eular.Cycript-Reveal 2 | Name: Cycript-Reveal 3 | Version: 0.1-1 4 | Description: 5 | Section: Tweaks 6 | Depends: firmware (>= 5.0), mobilesubstrate 7 | Conflicts: 8 | Replaces: 9 | Priority: optional 10 | Architecture: iphoneos-arm 11 | Author: Eular 12 | dev: 13 | Homepage: 14 | Depiction: 15 | Maintainer: 16 | Icon: 17 | 18 | -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript-Reveal/Package/DEBIAN/control.txt: -------------------------------------------------------------------------------- 1 | 2 | The control file in the same directory as this file is the Debian control file that is needed 3 | to build the project's Debian package that's used by APT repositories like Cydia. 4 | 5 | For more on... 6 | Debian packages, see http://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html. 7 | Debian control files, see http://www.debian.org/doc/debian-policy/ch-controlfields.html. 8 | Cydia packages, see http://www.saurik.com/id/7. 9 | 10 | Note: This file (control.txt) was created only to provide an explaination about the Debian control file. This file can now be deleted. 11 | -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript-Reveal/Package/Library/MobileSubstrate/DynamicLibraries/Cycript_Reveal.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Filter 6 | 7 | Classes 8 | 9 | CoreFoundationVersion 10 | 11 | Executables 12 | 13 | Bundles 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript-Reveal/PackageVersion.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BugFix 6 | 7 | Major 8 | 1 9 | Minor 10 | 0 11 | PackageRevision 12 | 1 13 | Stage 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript.framework/Cycript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Cycript-Reveal/Cycript.framework/Cycript -------------------------------------------------------------------------------- /Cycript-Reveal/Cycript.framework/Headers/Cycript.h: -------------------------------------------------------------------------------- 1 | /* Cycript - Optimizing JavaScript Compiler/Runtime 2 | * Copyright (C) 2009-2013 Jay Freeman (saurik) 3 | */ 4 | 5 | /* GNU General Public License, Version 3 {{{ */ 6 | /* 7 | * Cycript is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published 9 | * by the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * Cycript is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Cycript. If not, see . 19 | **/ 20 | /* }}} */ 21 | 22 | #ifndef CYCRIPT_CYCRIPT_H 23 | #define CYCRIPT_CYCRIPT_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void CYListenServer(short port); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif/*CYCRIPT_CYCRIPT_H*/ 36 | -------------------------------------------------------------------------------- /Cycript-Reveal/LatestBuild: -------------------------------------------------------------------------------- 1 | /Users/eular/Library/Developer/Xcode/DerivedData/Cycript-Reveal-exgpgtdxfqyecfcifccocsdgbufp/Build/Products/Debug-iphoneos -------------------------------------------------------------------------------- /Cycript-Reveal/Reveal.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /Cycript-Reveal/Reveal.framework/Reveal: -------------------------------------------------------------------------------- 1 | Versions/Current/Reveal -------------------------------------------------------------------------------- /Cycript-Reveal/Reveal.framework/Versions/A/Headers/IBANetServiceTypes.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2014 Itty Bitty Apps Pty Ltd. All rights reserved. 3 | 4 | #ifndef reveal_core_IBANetServiceTypes_h 5 | #define reveal_core_IBANetServiceTypes_h 6 | #import 7 | 8 | typedef NS_ENUM(uint32_t, IBANetServiceInterface) { 9 | IBANetServiceInterfaceAny = kDNSServiceInterfaceIndexAny, 10 | IBANetServiceInterfaceLocalOnly = kDNSServiceInterfaceIndexLocalOnly, 11 | IBANetServiceInterfaceUnicast = kDNSServiceInterfaceIndexUnicast, 12 | IBANetServiceInterfaceP2P = kDNSServiceInterfaceIndexP2P 13 | }; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /Cycript-Reveal/Reveal.framework/Versions/A/Headers/IBARevealLoader.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2013 Itty Bitty Apps. All rights reserved. 3 | 4 | #import 5 | 6 | extern NSString * const IBARevealLoaderRequestStartNotification; 7 | extern NSString * const IBARevealLoaderRequestStopNotification; 8 | 9 | extern NSString * const IBARevealLoaderSetOptionsNotification; 10 | extern NSString * const IBARevealLoaderOptionsLogLevelMaskKey; 11 | 12 | @interface IBARevealLoader : NSObject 13 | 14 | + (void)startServer; 15 | + (void)stopServer; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Cycript-Reveal/Reveal.framework/Versions/A/Headers/IBARevealLogger.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Itty Bitty Apps Pty Ltd. All rights reserved. 2 | // 3 | 4 | #import 5 | 6 | CF_EXTERN_C_BEGIN 7 | 8 | /*! 9 | \brief The Reveal Log level bit flags. 10 | \discussion These flags are additive. i.e. you should bitwise OR them together. 11 | 12 | \seealso IBARevealLoggerSetLevelMask 13 | \seealso IBARevealLoggerGetLevelMask 14 | 15 | Example: 16 | 17 | // Enable Error, Warning and Info logger levels. 18 | IBARevealLoggerSetLevelMask(IBARevealLogLevelError|IBARevealLogLevelWarn|IBARevealLogLevelInfo); 19 | 20 | */ 21 | typedef NS_OPTIONS(int32_t, IBARevealLogLevel) 22 | { 23 | IBARevealLogLevelNone = 0, 24 | IBARevealLogLevelDebug = (1 << 0), 25 | IBARevealLogLevelInfo = (1 << 1), 26 | IBARevealLogLevelWarn = (1 << 2), 27 | IBARevealLogLevelError = (1 << 3) 28 | }; 29 | 30 | /*! 31 | \brief Set the Reveal logger level mask. 32 | \param mask A bit mask which is a combination of the IBARevealLogLevel enum options. 33 | 34 | \discussion If you do not wish to see log messages from Reveal you should call this function with an appropriate level mask as early in your application's lifecycle as possible. For example in your application's main() function. 35 | 36 | Example: 37 | 38 | // Enable Error, Warning and Info logger levels. 39 | IBARevealLoggerSetLevelMask(IBARevealLogLevelError|IBARevealLogLevelWarn|IBARevealLogLevelInfo); 40 | 41 | */ 42 | CF_EXPORT void IBARevealLoggerSetLevelMask(int32_t mask); 43 | 44 | /*! 45 | \brief Get the current Reveal logger level mask. 46 | \return A bit mask representing the levels at which Reveal is currently logging. 47 | \discussion The default Reveal Logger level mask is IBARevealLogLevelError|IBARevealLogLevelWarn|IBARevealLogLevelInfo. 48 | 49 | Example: 50 | 51 | // Turn off the Info log level. 52 | IBARevealLoggerSetLevelMask(IBARevealLoggerGetLevelMask() & ~IBARevealLogLevelInfo); 53 | 54 | */ 55 | CF_EXPORT int32_t IBARevealLoggerGetLevelMask(void); 56 | 57 | CF_EXTERN_C_END 58 | -------------------------------------------------------------------------------- /Cycript-Reveal/Reveal.framework/Versions/A/Headers/Reveal.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Itty Bitty Apps Pty Ltd. All rights reserved. 2 | // 3 | 4 | #import 5 | #import "IBARevealLogger.h" 6 | #import "IBARevealLoader.h" 7 | 8 | //! Project version number for Reveal. 9 | FOUNDATION_EXPORT double RevealVersionNumber; 10 | 11 | //! Project version string for Reveal. 12 | FOUNDATION_EXPORT const unsigned char RevealVersionString[]; 13 | -------------------------------------------------------------------------------- /Cycript-Reveal/Reveal.framework/Versions/A/Reveal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Cycript-Reveal/Reveal.framework/Versions/A/Reveal -------------------------------------------------------------------------------- /Cycript-Reveal/Reveal.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # iOSAppHook [![star this repo](http://github-svg-buttons.herokuapp.com/star.svg?user=Urinx&repo=iOSAppHook&style=flat&background=1081C1)](http://github.com/Urinx/iOSAppHook) [![fork this repo](http://github-svg-buttons.herokuapp.com/fork.svg?user=Urinx&repo=iOSAppHook&style=flat&background=1081C1)](http://github.com/Urinx/iOSAppHook/fork) ![platform](https://img.shields.io/badge/platform-Xcode%208.1%20&%20iOS%2010-lightgrey.svg) [![download](https://img.shields.io/github/downloads/Urinx/iOSAppHook/total.svg)](https://github.com/Urinx/iOSAppHook/releases) 2 | 专注于非越狱环境下iOS应用逆向研究,从dylib注入,应用重签名到App Hook。 3 | 4 | > 注意!本文所有操作均在以下环境下成功进行,不同平台或环境可能存在某些问题,欢迎大家在[issue](https://github.com/Urinx/iOSAppHook/issues)中提出问题以及相互讨论。 5 | > 6 | > Mac OS X 10.11.6 (15G12a) - macOS Sierra 10.12.4 (16E144f)
7 | > Xcode 7.3.1 (7D1014) - 8.1 (8B62)
8 | > iPhone 5s, iOS 9.3.3 (13G21) - iOS 10.3 (14E5230e)
9 | > 免费开发者账号
10 | > 示例App:微信 6.3.19.18 - 6.5.4 11 | 12 | ## 目录 13 | * [前言](#前言) 14 | * [应用脱壳](#应用脱壳) 15 | * [应用重签名](#应用重签名) 16 | * [安装iOSOpenDev](#安装iOSOpenDev) 17 | * [App Hook](#App Hook) 18 | * [一个简单的CaptainHook载入Cycript](#一个简单的CaptainHook载入Cycript) 19 | * [使用Reveal调试微信的App界面](#使用Reveal调试微信的App界面) 20 | * [后续](#后续) 21 | * [常见问题](#常见问题) 22 | * [参考链接](#参考链接) 23 | 24 | ## 前言 25 | 提到非越狱环境下`App Hook`大家早就已经耳熟能详,已经有很多大神研究过,这方面相关的资料和文章也能搜到很多。我最早是看到乌云知识库上[蒸米](http://drops.wooyun.org/author/蒸米)的文章才对这方面有所了解,当时就想试试,整个过程看似简单(大神总是一笔带过),然而当自己真正开始动手时一路上遇到各种问题(一脸懵逼),在[iOSRE论坛](http://bbs.iosre.com)上也看到大家遇到的各种问题,其实阻扰大家的主要是一些环境的搭建以及相关配置没设置好,结果导致dylib编译过程各种错误,重签名不成功,各种闪退等。所以本文里的每一步操作都会很详细的交代,确保大家都能操作成功。 26 | 27 | ## 应用脱壳 28 | 我们知道,App Store里的应用都是加密了的,直接拿上来撸是不正确的,所以在此之前一般会有这么一个砸壳的过程,其中用到的砸壳工具就是[dumpdecrypted](https://github.com/stefanesser/dumpdecrypted),其原理是让app预先加载一个解密的dumpdecrypted.dylib,然后在程序运行后,将代码动态解密,最后在内存中dump出来整个程序。然而砸壳是在越狱的环境下进行的,鉴于本文主要关注点在非越狱环境下,再者我手里也没有越狱设备(有就不会这么蛋疼了)。 29 | 30 | 所以这里我们选择的是直接从PP助手等各种xx助手里面下载,注意的是这里下载的是越狱应用(不是正版应用),也就是所谓的脱过壳的应用。 31 | 32 | 为了谨慎起见,这里我们还需要确认一下从xx助手里下载的应用是否已解密,毕竟有好多应用是只有部分架构被解密,还有就是Watch App以及一些扩展依然加密了,所以最好还是确认一下,否则的话,就算hook成功,签名成功,安装成功,app还是会闪退。 33 | 34 | 首先,找到应用对应的二进制文件,查看包含哪些架构: 35 | ``` 36 | > file WeChat.app/WeChat 37 | WeChat.app/WeChat: Mach-O universal binary with 2 architectures 38 | WeChat.app/WeChat (for architecture armv7): Mach-O executable arm 39 | WeChat.app/WeChat (for architecture arm64): Mach-O 64-bit executable 40 | ``` 41 | 可以看到微信包含两个架构,armv7和arm64。关于架构与设备之间的对应关系可以从[iOS Support Matrix](http://iossupportmatrix.com)上查看。理论上只要把最老的架构解密就可以了,因为新的cpu会兼容老的架构。 42 | 43 | `otool`可以输出app的load commands,然后通过查看cryptid这个标志位来判断app是否被加密。1代表加密了,0代表被解密了: 44 | ``` 45 | > otool -l WeChat.app/WeChat | grep -B 2 crypt 46 | cmd LC_ENCRYPTION_INFO 47 | cmdsize 20 48 | cryptoff 16384 49 | cryptsize 40534016 50 | cryptid 0 51 | -- 52 | cmd LC_ENCRYPTION_INFO_64 53 | cmdsize 24 54 | cryptoff 16384 55 | cryptsize 43663360 56 | cryptid 0 57 | ``` 58 | 可以看到微信已经被解密了,第一个对应的是较老的armv7架构,后者则是arm64架构。 59 | 60 | 鉴于微信是一个多targets的应用,包含一个Watch App和一个分享扩展。所以同理,我们还需要依次确认以下二进制文件,这里就跳过了。 61 | ``` 62 | WeChat.app/Watch/WeChatWatchNative.app/WeChatWatchNative 63 | WeChat.app/Watch/WeChatWatchNative.app/PlugIns/WeChatWatchNativeExtension.appex/WeChatWatchNativeExtension 64 | WeChat.app/PlugIns/WeChatShareExtensionNew.appex/WeChatShareExtensionNew 65 | ``` 66 | 67 | ## 应用重签名 68 | 在第二部分我们将要进行的是应用重签名,注意这里并不是按照整个操作流程的顺序来讲,而是跳过编译dylib,因为我觉得如果现在你没有把重签名拿下的话,写tweak写hook都是白搭。所以从这里在开始,我们不需要对App进行任何修改和处理,仅仅对其进行重签名,然后将其安装到设备上能够正常的运行。再次提醒的是重签名用的是脱壳后的App,加密的App重签名成功安到设备上也会闪退。 69 | 70 | 关于iOS应用重签名的文章有很多,签名方法都是一样,个别地方会有些小出入,然后按照里面给出的步骤手动一步一步的来操作,不知道是由于免费的开发者证书的原因还是哪一步漏掉了或者是什么其它的原因,总之就是不成功。就在一筹莫展的时候,偶然发现了一个名为[iOS App Signer](https://github.com/DanTheMan827/ios-app-signer)的Mac上的应用,这款重签名工具能够用免费的开发者账号重签名应用。我试了下,用这个工具重签名了一个应用,并且成功安装到手机上,尽管打开时闪退,但至少总算能安装到设备上去了。 71 | 72 | 看到签名成功心里一阵高兴,并且由于该应用开源,于是就到Github上阅读源码看其具体的实现。该应用是用Swift语音所写,代码量也不多,阅读起来没有问题。由于整个操作都是在终端下进行的,从终端到图形界面来回切换实在是麻烦,所以在其代码基础上稍作修改写了一个`Command Line Tool`工具在命令行下使用。 73 | 74 | 下面就来具体交代下这个重签名工具到底做了什么。 75 | 76 | **1. 获取到本地上的开发者签名证书和所有的Provisioning文件** 77 | 78 | 获取本机上的Provisioning文件主要是调用了`populateProvisioningProfiles()`方法,该方法调用了`ProvisioningProfile.getProfiles()`将结果封装到`ProvisioningProfile`结构体中以数组的形式返回,并对其结果做了一个刷选,去掉了那些过期的证书。 79 | 80 | ``` 81 | struct ProvisioningProfile { 82 | ... 83 | static func getProfiles() -> [ProvisioningProfile] { 84 | var output: [ProvisioningProfile] = [] 85 | 86 | let fileManager = NSFileManager() 87 | if let libraryDirectory = fileManager.URLsForDirectory(.LibraryDirectory, inDomains: .UserDomainMask).first, libraryPath = libraryDirectory.path { 88 | let provisioningProfilesPath = libraryPath.stringByAppendingPathComponent("MobileDevice/Provisioning Profiles") as NSString 89 | 90 | if let provisioningProfiles = try? fileManager.contentsOfDirectoryAtPath(provisioningProfilesPath as String) { 91 | for provFile in provisioningProfiles { 92 | if provFile.pathExtension == "mobileprovision" { 93 | let profileFilename = provisioningProfilesPath.stringByAppendingPathComponent(provFile) 94 | if let profile = ProvisioningProfile(filename: profileFilename) { 95 | output.append(profile) 96 | } 97 | } 98 | } 99 | } 100 | } 101 | return output 102 | } 103 | ... 104 | } 105 | ``` 106 | 简单点用shell表示就是,先列出所有的`~/Library/MobileDevice/Provisioning Profiles`路径下所有的后缀为`.mobileprovision`的文件,然后依次获取文件的信息(plist格式)。 107 | ``` 108 | security cms -D -i "~/Library/MobileDevice/Provisioning Profiles/xxx.mobileprovision" 109 | ``` 110 | 111 | 获取开发者签名证书: 112 | ``` 113 | func populateCodesigningCerts() { 114 | var output: [String] = [] 115 | 116 | let securityResult = NSTask().execute(securityPath, workingDirectory: nil, arguments: ["find-identity","-v","-p","codesigning"]) 117 | if securityResult.output.characters.count >= 1 { 118 | let rawResult = securityResult.output.componentsSeparatedByString("\"") 119 | 120 | for index in 0.stride(through: rawResult.count - 2, by: 2) { 121 | if !(rawResult.count - 1 < index + 1) { 122 | output.append(rawResult[index+1]) 123 | } 124 | } 125 | } 126 | self.codesigningCerts = output 127 | 128 | Log("Found \(output.count) Codesigning Certificates") 129 | } 130 | ``` 131 | 以上代码相当于: 132 | ``` 133 | > security find-identity -v -p codesigning 134 | 1) 1234567890123456789012345678901234567890 "iPhone Developer: XXX (xxxxxxxxxx)" 135 | 2) 1234567890123456789012345678901234567890 "Mac Developer: XXX (xxxxxxxxxx)" 136 | ``` 137 | 138 | **2. 一些准备工作** 139 | 140 | 创建临时目录,`makeTempFolder()`方法: 141 | ``` 142 | > mktemp -d -t com.eular.test 143 | /var/folders/qr/8_n21zhd4f993khcsh_qll000000gp/T/com.eular.test.6aHPpdBZ 144 | ``` 145 | 146 | 处理不同格式的输入文件,包括`deb`,`ipa`,`app`,`xcarchive`: 147 | ``` 148 | deb -> ar -x xxx.deb -> tar -xf xxx.tar -> mv Applications/ -> Payload/ 149 | ipa -> unzip -> Payload/ 150 | app -> copy -> Payload/ 151 | xcarchive -> copy .xcarchive/Products/Applications/ -> Payload/ 152 | ``` 153 | 154 | **3. 重签名** 155 | 156 | 首先,复制provisioning文件到app目录里: 157 | ``` 158 | cp xxx.mobileprovision Payload/xxx.app/embedded.mobileprovision 159 | ``` 160 | 161 | 根据provisioning文件导出entitlements.plist: 162 | ``` 163 | if provisioningFile != nil || useAppBundleProfile { 164 | print("Parsing entitlements") 165 | 166 | if let profile = ProvisioningProfile(filename: useAppBundleProfile ? appBundleProvisioningFilePath : provisioningFile!){ 167 | if let entitlements = profile.getEntitlementsPlist(tempFolder) { 168 | Log("–––––––––––––––––––––––\n\(entitlements)") 169 | Log("–––––––––––––––––––––––") 170 | do { 171 | try entitlements.writeToFile(entitlementsPlist, atomically: false, encoding: NSUTF8StringEncoding) 172 | Log("Saved entitlements to \(entitlementsPlist)") 173 | } catch let error as NSError { 174 | Log("Error writing entitlements.plist, \(error.localizedDescription)") 175 | } 176 | } else { 177 | Log("Unable to read entitlements from provisioning profile") 178 | warnings += 1 179 | } 180 | if profile.appID != "*" && (newApplicationID != "" && newApplicationID != profile.appID) { 181 | Log("Unable to change App ID to \(newApplicationID), provisioning profile won't allow it") 182 | cleanup(tempFolder); return 183 | } 184 | } else { 185 | Log("Unable to parse provisioning profile, it may be corrupt") 186 | warnings += 1 187 | } 188 | 189 | } 190 | ``` 191 | 192 | 修复可执行文件的权限: 193 | ``` 194 | if let bundleExecutable = getPlistKey(appBundleInfoPlist, keyName: "CFBundleExecutable"){ 195 | NSTask().execute(chmodPath, workingDirectory: nil, arguments: ["755", appBundlePath.stringByAppendingPathComponent(bundleExecutable)]) 196 | } 197 | ``` 198 | 199 | 替换所有Info.plist里的`CFBundleIdentifier`: 200 | ``` 201 | if let oldAppID = getPlistKey(appBundleInfoPlist, keyName: "CFBundleIdentifier") { 202 | 203 | func changeAppexID(appexFile: String){ 204 | 205 | func shortName(file: String, payloadDirectory: String) -> String { 206 | return file.substringFromIndex(payloadDirectory.endIndex) 207 | } 208 | 209 | let appexPlist = appexFile.stringByAppendingPathComponent("Info.plist") 210 | if let appexBundleID = getPlistKey(appexPlist, keyName: "CFBundleIdentifier"){ 211 | let newAppexID = "\(newApplicationID)\(appexBundleID.substringFromIndex(oldAppID.endIndex))" 212 | print("Changing \(shortName(appexFile, payloadDirectory: payloadDirectory)) id to \(newAppexID)") 213 | 214 | setPlistKey(appexPlist, keyName: "CFBundleIdentifier", value: newAppexID) 215 | } 216 | if NSTask().execute(defaultsPath, workingDirectory: nil, arguments: ["read", appexPlist,"WKCompanionAppBundleIdentifier"]).status == 0 { 217 | setPlistKey(appexPlist, keyName: "WKCompanionAppBundleIdentifier", value: newApplicationID) 218 | } 219 | recursiveDirectorySearch(appexFile, extensions: ["app"], found: changeAppexID) 220 | } 221 | 222 | recursiveDirectorySearch(appBundlePath, extensions: ["appex"], found: changeAppexID) 223 | } 224 | ... 225 | ``` 226 | 227 | 然后对所有的`dylib`,`so`,`0`,`vis`,`pvr`,`framework`,`appex`,`app`以及`egg`文件用`codesign`命令进行签名。代码略长,此处不写。 228 | 229 | **4. 打包** 230 | 231 | 最后将上述目录用zip打包成ipa文件就可以了。 232 | 233 | **5. 安装ipa文件** 234 | 235 | 这里用到的是`mobiledevice`工具,执行下列命令安装ipa文件到手机上: 236 | ``` 237 | ./mobiledevice install_app xxx.ipa 238 | ``` 239 | 当然,你也可以使用`ideviceinstaller`工具。 240 | ``` 241 | ./ideviceinstaller -i xxx.ipa 242 | ``` 243 | 244 | 总之,上述步骤较多,主要集中在前4个步骤上,不建议自己操作,你可以选择使用图形界面的`iOS App Signer`应用,也可以使用我提供的根据其开源代码写的命令行工具,`AppResign`,你可以直接下载编译好的[二进制文件](https://github.com/Urinx/iOSAppHook/releases)。 245 | 246 | 使用方法: 247 | ``` 248 | ./AppResign input out 249 | ``` 250 | 251 | 这里以微信为例,我们一开始直接对其重签名,总是不成功,我猜问题主要在里面的Watch App上。于是乎便采取的最简单粗暴的方法,解压ipa文件,将`WeChat.app`里面的`Watch`文件夹,连同`PlugIns`文件夹一起删去。再用`AppResign`重签名,如图所示: 252 | 253 | ![AppResign](Screenshot/AppResign.png) 254 | 255 | 这时候将其安装到设备上,成功,并能够正常的打开。至此,这一步就大功告成了。 256 | 257 | 最后一点要注意的是,由于中国的开发者利用免费的证书大量对应用进行重签名,所以目前苹果加上了许多限制,免费开发者的provisioning证书有效时间从之前的30天改为7天,过期后需要重新签名。另外就是一个星期内最多只能申请到10个证书。 258 | 259 | ## 安装iOSOpenDev 260 | 如果上面的重签名步骤你能够成功的进行,接下来便开始考虑搭建编写dylib的越狱开发环境了。这里我们选择的是iOSOpenDev这个越狱开发平台工具,该工具集成到Xcode里面,提供了编写越狱应用插件的各种模版。所以下面就讲讲如何以正确的姿势安装iOSOpenDev。 261 | 262 | 一般一开始我们会去其官网上下载了一个pkg安装文件然后点击安装,结果一般会安装失败,接下来就开始尝试了各种姿势。其实那个pkg安装文件也没干啥,就是执行了一个iod-setup脚本,好吧于是就手工执行了这个脚本,发现其中下载github上的东西老是失败,然后翻了个墙,然后就好了。。。 263 | ``` 264 | sudo ./iod-setup base 265 | sudo ./iod-setup sdk -sdk iphoneos 266 | ``` 267 | 268 | 执行第二步会出现一个错误就是链接iOS 9.3的private framework失败,主要是在9.3的SDK里去掉了private framework。 269 | ``` 270 | PrivateFramework directory not found: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/PrivateFrameworks 271 | ``` 272 | 273 | 解决办法: 274 | 275 | 1. 在[这里](https://jbdevs.org/sdks/)下载9.2的SDK。 276 | 2. 解压后放到/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs。 277 | 3. 你可以把9.2里面的PrivateFrameworks文件夹复制到9.3对应的位置里path/to/iPhoneOS9.3.sdk/System/Library/。 278 | 4. 或者是修改/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist文件,将`MinimumSDKVersion`改为9.2。 279 | 5. 再次运行`sudo ./iod-setup sdk -sdk iphoneos`命令。 280 | 281 | ![iOSOpenDev](Screenshot/iOSOpenDev.png) 282 | 283 | 新建个CaptainHook连上设备编译一下,就可以发现编译成功了。 284 | 285 | ## App Hook 286 | 在这部分里,我们便开始动手编写dylib并将其注入到目标应用中。首先打开Xcode,新建一个项目,模版选择iOSOpenDev里的CaptainHook Tweak,项目名为hook。 287 | 288 | 删除hook.mm文件里的模版内容,替换为以下内容: 289 | ``` 290 | __attribute__((constructor)) static void entry() { 291 | NSLog(@"hello, world!"); 292 | } 293 | ``` 294 | `Cmd+B`编译,打开LatestBuild文件夹,得到编译好的dylib文件。 295 | 296 | 使用[yololib](https://github.com/KJCracks/yololib)工具对对二进制文件进行dylib的注入。 297 | ``` 298 | >./yololib WeChat.app/WeChat hook.dylib 299 | 2016-06-16 07:35:06.014 yololib[49519:642763] dylib path @executable_path/hook.dylib 300 | 2016-06-16 07:35:06.016 yololib[49519:642763] dylib path @executable_path/hook.dylib 301 | Reading binary: WeChat.app/WeChat 302 | 303 | 2016-06-16 07:35:06.016 yololib[49519:642763] FAT binary! 304 | 2016-06-16 07:35:06.016 yololib[49519:642763] Injecting to arch 9 305 | 2016-06-16 07:35:06.016 yololib[49519:642763] Patching mach_header.. 306 | 2016-06-16 07:35:06.016 yololib[49519:642763] Attaching dylib.. 307 | 308 | 2016-06-16 07:35:06.016 yololib[49519:642763] Injecting to arch 0 309 | 2016-06-16 07:35:06.016 yololib[49519:642763] 64bit arch wow 310 | 2016-06-16 07:35:06.016 yololib[49519:642763] dylib size wow 56 311 | 2016-06-16 07:35:06.017 yololib[49519:642763] mach.ncmds 75 312 | 2016-06-16 07:35:06.017 yololib[49519:642763] mach.ncmds 76 313 | 2016-06-16 07:35:06.017 yololib[49519:642763] Patching mach_header.. 314 | 2016-06-16 07:35:06.017 yololib[49519:642763] Attaching dylib.. 315 | 316 | 2016-06-16 07:35:06.017 yololib[49519:642763] size 51 317 | 2016-06-16 07:35:06.017 yololib[49519:642763] complete! 318 | ``` 319 | 320 | 注入成功后可以用MachOView程序查看整个MachO文件的结构,比如在`Load Commands`这个数据段里,可以看到`LC_LOAD_DYLIB`加载动态库。我们使用MachOView打开,可以看到已经被注入hook.dylib,如图所示。 321 | 322 | ![MachOView](Screenshot/MachOView.png) 323 | 324 | 别忘了,我们还需要将我们注入的dylib文件放到WeChat.app目录下。 325 | ``` 326 | cp hook.dylib WeChat.app/ 327 | ``` 328 | 329 | 接下来就是之前的老套路了,先重签名然后安装到设备上。安装完后,我们用idevicesyslog查看log信息。在命令行中输入命令: 330 | ``` 331 | idevicesyslog 332 | ``` 333 | 然后打开我们修改过的微信应用,可以看到如下图的log输出信息。 334 | 335 | ![Log1](Screenshot/Log1.png) 336 | 337 | 可以看到`hello, world!`成功输出,表示我们的dylib的代码已经能够执行。 338 | 339 | ## 一个简单的CaptainHook载入Cycript 340 | 当然不可能一个NSLog结束了,所以接下来我们将编写一个dylib来载入Cycript工具方便我们以后调试目标应用。 341 | 342 | 新建一个CaptainHook,项目名为loadCycript。首先,导入`Cycript.framework`,另外还需要导入其依赖的`JavaScriptCore.framework`,`libsqlite3.0.tbd`和`libstdc++.6.0.9.tbd`。 343 | 344 | 然后,在Build Settings里面的搜索bitcode,将`Enable Bitcode`选项设为`NO`。 345 | 346 | ![bitcode](Screenshot/bitcode.png) 347 | 348 | 一开始编写loadCycript.mm文件的内容是这样的: 349 | ``` 350 | #import 351 | #import 352 | 353 | #define CYCRIPT_PORT 8888 354 | 355 | CHDeclareClass(AppDelegate); 356 | CHDeclareClass(UIApplication); 357 | 358 | CHOptimizedMethod2(self, void, AppDelegate, application, UIApplication *, application, didFinishLaunchingWithOptions, NSDictionary *, options) 359 | { 360 | CHSuper2(AppDelegate, application, application, didFinishLaunchingWithOptions, options); 361 | 362 | NSLog(@"## Start Cycript ##"); 363 | CYListenServer(CYCRIPT_PORT); 364 | } 365 | 366 | __attribute__((constructor)) static void entry() { 367 | CHLoadLateClass(AppDelegate); 368 | CHHook2(AppDelegate, application, didFinishLaunchingWithOptions); 369 | } 370 | ``` 371 | 上述代码hook了AppDelegate里的`application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)`方法,在该方法里开启Cycript并绑定到8888端口。 372 | 373 | 编译该项目生成dylib文件,注入到微信App中,重签名后安装到手机里,然后在idevicesyslog输出的日志里看看有没有我们输出的信息,结果找了半天,嗯哼,还真没有。。。 374 | 375 | 问题出在哪了呢,难道是`application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)`这个方法没有hook成功吗?好吧,随后又试了试hook`applicationDidEnterBackground`等方法,结果没一个成功,然后就一脸懵逼了,此时第一反应就是不会没有`AppDelegate`这个类吧。 376 | 377 | 没办法,只有导出微信的头文件看看了。 378 | ``` 379 | class-dump -H -o header WeChat.app/WeChat 380 | ``` 381 | 结果一看,还真没有(°_°)… 通过搜索关键字`AppDelegate`终于找到了其真身`MicroMessengerAppDelegate`,虽说穿了个马甲,但依然还是它。 382 | 383 | ![MicroMessengerAppDelegate](Screenshot/MicroMessengerAppDelegate.png) 384 | 385 | 该有的方法都有,这样我就放心了。于是对之前的代码稍作修改就可以了。 386 | ``` 387 | #import 388 | #import 389 | 390 | #define CYCRIPT_PORT 8888 391 | 392 | CHDeclareClass(UIApplication); 393 | CHDeclareClass(MicroMessengerAppDelegate); 394 | 395 | CHOptimizedMethod2(self, void, MicroMessengerAppDelegate, application, UIApplication *, application, didFinishLaunchingWithOptions, NSDictionary *, options) 396 | { 397 | CHSuper2(MicroMessengerAppDelegate, application, application, didFinishLaunchingWithOptions, options); 398 | 399 | NSLog(@"## Start Cycript ##"); 400 | CYListenServer(CYCRIPT_PORT); 401 | } 402 | 403 | 404 | CHConstructor { 405 | @autoreleasepool { 406 | CHLoadLateClass(MicroMessengerAppDelegate); 407 | CHHook2(MicroMessengerAppDelegate, application, didFinishLaunchingWithOptions); 408 | } 409 | } 410 | ``` 411 | 再跑一遍,这会我们就能在log日志里能看到Cycript成功开启的消息了。 412 | 413 | ![Log2](Screenshot/Log2.png) 414 | 415 | 我们用Cycript远程连上去调试看看,比如说修改发现页的tableView背景颜色。 416 | 417 | ![Cycript](Screenshot/Cycript.png) 418 | 419 | ![wechat](Screenshot/wechat.png) 420 | 421 | 注:本文中用到的AppResign重签名工具,以及编译好的loadCycript.dylib可以在[这里](https://github.com/Urinx/iOSAppHook/releases)下载。 422 | 423 | ## 使用Reveal调试微信的App界面 424 | Reveal这个调试应用UI界面的神器这里就不再介绍了,本文所有的相关资料都在参考链接里请自行查看。 425 | 426 | 首先从Reveal应用中找到提供的静态库文件。 427 | 428 | ![wechat](Screenshot/Reveal0.png) 429 | 430 | 将`Reveal.framework`从`Build Phase`里面的`Link Binary`里面去掉,然后添加其它的相关依赖库: `UIKit.framework`,`CoreGraphics.framework`,`QuartzCore.framework`,`CFNetwork.framework`,`libz.tbd`。 431 | 432 | 接着在`Build Settings`里面搜索`Other Linker Flags`,将其设置为: 433 | ``` 434 | -ObjC -lz -framework Reveal 435 | ``` 436 | 437 | ![wechat](Screenshot/Reveal1.png) 438 | 439 | 接下来编译项目就可以了,你甚至都不用写一句代码。编译好的dylib按照前面说的方法注入到微信App中,打开Reveal应用就可以连接上手机了。 440 | 441 | ![wechat](Screenshot/Reveal2.png) 442 | 443 | 注:编译好的Reveal.dylib以及Cycript和Reveal结合的dylib都可以在[这里](https://github.com/Urinx/iOSAppHook/releases)下载。 444 | 445 | ## 后续 446 | 至于之后该做什么,你想干嘛就干嘛。Cycript在手,天下我有,Reveal一出,谁与争锋。你可以使用Class-dump工具dump出应用的头文件,或者是将二进制文件拖到ida或hopper里面反汇编分析,写tweak插件,实现各种姿势抢红包等等,本文就不讨论这些了。 447 | 448 | ## 常见问题 449 | 450 | **1. Invalid or unsupported format for signature** 451 | 452 | 一般我们拿到越狱脱壳后的应用什么都不做直接重签名后时是可以成功安装的,然而一旦注入dylib之后再进行重签名时就可能遇到此错误,原因一般出在注入dylib过程中。 453 | 454 | 例如,在国内某助手的越狱应用商店上下载了一个`6.5.3`版本的微信,通过`file`命令可以看到可执行文件里还包含了一个奇葩的`x86_64`指令集(你确定这不是模拟器上跑的): 455 | 456 | ```bash 457 | > file WeChat.app/WeChat 458 | WeChat.app/WeChat: Mach-O universal binary with 2 architectures: [arm_v7: Mach-O executable arm_v7] [x86_64] 459 | WeChat.app/WeChat (for architecture armv7): Mach-O executable arm_v7 460 | WeChat.app/WeChat (for architecture x86_64): Mach-O 64-bit executable x86_64 461 | ``` 462 | 463 | 挂上dylib后再重签名就报错了: 464 | 465 | ![problem_0](Screenshot/problem_0.png) 466 | 467 | 如果用`MachOView`软件看看是否注入成功,可以发现在`x86_64`上出错了。 468 | 469 | ![problem_1](Screenshot/problem_1.png) 470 | 471 | 这个不能怪我咯,要怪只能怪`yololib`工具了。 472 | 473 | **2. 应用只有一个指令集** 474 | 475 | 在重签名`3.4.0`版本的`Malody`应用时,通过`file`命令可以看到该执行文件只有一个`armv7`指令集: 476 | 477 | ```bash 478 | > file Malody.app/Malody\ Mobile 479 | Malody.app/Malody Mobile: Mach-O universal binary with 1 architecture: [arm_v7: Mach-O executable arm_v7] 480 | Malody.app/Malody Mobile (for architecture armv7): Mach-O executable arm_v7 481 | ``` 482 | 483 | 如果此时对其重签名则会报如下错误: 484 | 485 | ![problem_2](Screenshot/problem_2.png) 486 | 487 | 解决方法是在执行`codesign`命令时需要指定选项`-a armv7`,不然默认的参数是`--all-architectures`。此bug已修复,如遇到此问题,请使用最新版的AppResign。 488 | 489 | ## 参考链接 490 | 之前看的都没记录,下列都是后来想到才记下来的。 491 | 492 | 蒸米的iOS冰与火之歌系列: 493 | - http://drops.wooyun.org/author/蒸米 494 | - http://drops.wooyun.org/papers/12803 495 | - http://drops.wooyun.org/papers/13824 496 | 497 | 微信重签名相关: 498 | - https://testerhome.com/topics/4558 499 | - http://www.jianshu.com/p/3f57d51f770a/comments/1757000 500 | - http://iosre.com/t/topic/2966 501 | - http://bbs.iosre.com/t/targets-app/2664/15 502 | 503 | iOSOpenDev: 504 | - https://github.com/wzqcongcong/iOSOpenDev 505 | - http://www.aichengxu.com/view/6004431 506 | - http://bbs.iosre.com/t/xcode7-iosopendev-iosopendev-ios9/1963 507 | - http://bbs.iosre.com/t/xcode-7-3-ios-9-3-sdk-theos-private-framework/3200 508 | 509 | Reveal 510 | - http://blog.devzeng.com/blog/ios-reveal-integrating.html 511 | - http://support.revealapp.com/kb/getting-started/integrating-reveal-with-your-ios-app 512 | - https://github.com/QQVIPTeam/practice-of-ios/issues/10 513 | - https://hurui.gitbooks.io/reveal-debug/content/noModify.html 514 | 515 | 其它: 516 | - http://apple.stackexchange.com/questions/213440/remotely-distribute-an-ios-app-compiled-in-xcode-7-without-app-store-developer 517 | - https://gist.github.com/chaitanyagupta/9a2a13f0a3e6755192f7 518 | -------------------------------------------------------------------------------- /Screenshot/AppResign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/AppResign.png -------------------------------------------------------------------------------- /Screenshot/Cycript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/Cycript.png -------------------------------------------------------------------------------- /Screenshot/Log1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/Log1.png -------------------------------------------------------------------------------- /Screenshot/Log2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/Log2.png -------------------------------------------------------------------------------- /Screenshot/MachOView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/MachOView.png -------------------------------------------------------------------------------- /Screenshot/MicroMessengerAppDelegate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/MicroMessengerAppDelegate.png -------------------------------------------------------------------------------- /Screenshot/Reveal0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/Reveal0.png -------------------------------------------------------------------------------- /Screenshot/Reveal1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/Reveal1.png -------------------------------------------------------------------------------- /Screenshot/Reveal2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/Reveal2.png -------------------------------------------------------------------------------- /Screenshot/bitcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/bitcode.png -------------------------------------------------------------------------------- /Screenshot/iOSOpenDev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/iOSOpenDev.png -------------------------------------------------------------------------------- /Screenshot/problem_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/problem_0.png -------------------------------------------------------------------------------- /Screenshot/problem_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/problem_1.png -------------------------------------------------------------------------------- /Screenshot/problem_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/problem_2.png -------------------------------------------------------------------------------- /Screenshot/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/Screenshot/wechat.png -------------------------------------------------------------------------------- /bin/class-dump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/bin/class-dump -------------------------------------------------------------------------------- /bin/cycript: -------------------------------------------------------------------------------- 1 | # Cycript - The Truly Universal Scripting Language 2 | # Copyright (C) 2009-2016 Jay Freeman (saurik) 3 | 4 | # GNU Affero General Public License, Version 3 {{{ 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Affero General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU Affero General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Affero General Public License 17 | # along with this program. If not, see . 18 | # }}} 19 | 20 | dir=${0%/*}/Cycript.lib 21 | if [[ ${dir} != /* ]]; then 22 | dir=$(pwd)/${dir} 23 | fi 24 | 25 | if [[ -n $ANDROID_ROOT ]]; then 26 | export LD_LIBRARY_PATH="${dir}" 27 | export TERMINFO="${dir}" 28 | export TERM=linux 29 | suffix=-a32 30 | else 31 | export DYLD_LIBRARY_PATH=${dir} 32 | suffix=-apl 33 | fi 34 | 35 | exec "${dir}"/cycript"${suffix}" "$@" 36 | -------------------------------------------------------------------------------- /bin/mobiledevice: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/bin/mobiledevice -------------------------------------------------------------------------------- /bin/yololib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/bin/yololib -------------------------------------------------------------------------------- /loadCycript/Cycript.framework/Cycript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/loadCycript/Cycript.framework/Cycript -------------------------------------------------------------------------------- /loadCycript/Cycript.framework/Headers/Cycript.h: -------------------------------------------------------------------------------- 1 | /* Cycript - Optimizing JavaScript Compiler/Runtime 2 | * Copyright (C) 2009-2013 Jay Freeman (saurik) 3 | */ 4 | 5 | /* GNU General Public License, Version 3 {{{ */ 6 | /* 7 | * Cycript is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published 9 | * by the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * Cycript is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Cycript. If not, see . 19 | **/ 20 | /* }}} */ 21 | 22 | #ifndef CYCRIPT_CYCRIPT_H 23 | #define CYCRIPT_CYCRIPT_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void CYListenServer(short port); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif/*CYCRIPT_CYCRIPT_H*/ 36 | -------------------------------------------------------------------------------- /loadCycript/LatestBuild: -------------------------------------------------------------------------------- 1 | /Users/eular/Library/Developer/Xcode/DerivedData/loadCycript-ejljquaivooduegcyhfvkplwzsfa/Build/Products/Debug-iphoneos -------------------------------------------------------------------------------- /loadCycript/loadCycript.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | BB4852D81D12252B0043366E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB4852D71D12252B0043366E /* Foundation.framework */; }; 11 | BB4852E21D12252C0043366E /* loadCycript.mm in Sources */ = {isa = PBXBuildFile; fileRef = BB4852E11D12252C0043366E /* loadCycript.mm */; }; 12 | BB4852EF1D1226960043366E /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB4852EE1D1226960043366E /* JavaScriptCore.framework */; }; 13 | BB4852F11D1226A30043366E /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = BB4852F01D1226A30043366E /* libsqlite3.0.tbd */; }; 14 | BB4852F31D1226AE0043366E /* libstdc++.6.0.9.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = BB4852F21D1226AE0043366E /* libstdc++.6.0.9.tbd */; }; 15 | BB4853401D124FCF0043366E /* Cycript.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB48533F1D124FCF0043366E /* Cycript.framework */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | BB4852D41D12252B0043366E /* loadCycript.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = loadCycript.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | BB4852D71D12252B0043366E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 21 | BB4852DC1D12252C0043366E /* control.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = control.txt; path = Package/DEBIAN/control.txt; sourceTree = ""; }; 22 | BB4852DD1D12252C0043366E /* control */ = {isa = PBXFileReference; lastKnownFileType = text; name = control; path = Package/DEBIAN/control; sourceTree = ""; }; 23 | BB4852DF1D12252C0043366E /* PackageVersion.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PackageVersion.plist; sourceTree = ""; }; 24 | BB4852E01D12252C0043366E /* loadCycript-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "loadCycript-Prefix.pch"; sourceTree = ""; }; 25 | BB4852E11D12252C0043366E /* loadCycript.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = loadCycript.mm; sourceTree = ""; }; 26 | BB4852E61D12252C0043366E /* loadCycript.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = loadCycript.plist; path = Package/Library/MobileSubstrate/DynamicLibraries/loadCycript.plist; sourceTree = ""; }; 27 | BB4852EE1D1226960043366E /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 28 | BB4852F01D1226A30043366E /* libsqlite3.0.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.0.tbd; path = usr/lib/libsqlite3.0.tbd; sourceTree = SDKROOT; }; 29 | BB4852F21D1226AE0043366E /* libstdc++.6.0.9.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libstdc++.6.0.9.tbd"; path = "usr/lib/libstdc++.6.0.9.tbd"; sourceTree = SDKROOT; }; 30 | BB48533F1D124FCF0043366E /* Cycript.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Cycript.framework; sourceTree = ""; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXFrameworksBuildPhase section */ 34 | BB4852D01D12252B0043366E /* Frameworks */ = { 35 | isa = PBXFrameworksBuildPhase; 36 | buildActionMask = 2147483647; 37 | files = ( 38 | BB4852F31D1226AE0043366E /* libstdc++.6.0.9.tbd in Frameworks */, 39 | BB4852F11D1226A30043366E /* libsqlite3.0.tbd in Frameworks */, 40 | BB4852EF1D1226960043366E /* JavaScriptCore.framework in Frameworks */, 41 | BB4853401D124FCF0043366E /* Cycript.framework in Frameworks */, 42 | BB4852D81D12252B0043366E /* Foundation.framework in Frameworks */, 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | /* End PBXFrameworksBuildPhase section */ 47 | 48 | /* Begin PBXGroup section */ 49 | BB4852CA1D12252B0043366E = { 50 | isa = PBXGroup; 51 | children = ( 52 | BB4852D91D12252C0043366E /* loadCycript */, 53 | BB4852D61D12252B0043366E /* Frameworks */, 54 | BB4852D51D12252B0043366E /* Products */, 55 | ); 56 | sourceTree = ""; 57 | }; 58 | BB4852D51D12252B0043366E /* Products */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | BB4852D41D12252B0043366E /* loadCycript.dylib */, 62 | ); 63 | name = Products; 64 | sourceTree = ""; 65 | }; 66 | BB4852D61D12252B0043366E /* Frameworks */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | BB48533F1D124FCF0043366E /* Cycript.framework */, 70 | BB4852F21D1226AE0043366E /* libstdc++.6.0.9.tbd */, 71 | BB4852F01D1226A30043366E /* libsqlite3.0.tbd */, 72 | BB4852EE1D1226960043366E /* JavaScriptCore.framework */, 73 | BB4852D71D12252B0043366E /* Foundation.framework */, 74 | ); 75 | name = Frameworks; 76 | sourceTree = ""; 77 | }; 78 | BB4852D91D12252C0043366E /* loadCycript */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | BB4852E11D12252C0043366E /* loadCycript.mm */, 82 | BB4852DA1D12252C0043366E /* Package */, 83 | BB4852DE1D12252C0043366E /* Supporting Files */, 84 | ); 85 | path = loadCycript; 86 | sourceTree = ""; 87 | }; 88 | BB4852DA1D12252C0043366E /* Package */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | BB4852DB1D12252C0043366E /* DEBIAN */, 92 | BB4852E31D12252C0043366E /* Library */, 93 | ); 94 | name = Package; 95 | sourceTree = ""; 96 | }; 97 | BB4852DB1D12252C0043366E /* DEBIAN */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | BB4852DC1D12252C0043366E /* control.txt */, 101 | BB4852DD1D12252C0043366E /* control */, 102 | ); 103 | name = DEBIAN; 104 | sourceTree = ""; 105 | }; 106 | BB4852DE1D12252C0043366E /* Supporting Files */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | BB4852DF1D12252C0043366E /* PackageVersion.plist */, 110 | BB4852E01D12252C0043366E /* loadCycript-Prefix.pch */, 111 | ); 112 | name = "Supporting Files"; 113 | sourceTree = ""; 114 | }; 115 | BB4852E31D12252C0043366E /* Library */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | BB4852E41D12252C0043366E /* MobileSubstrate */, 119 | ); 120 | name = Library; 121 | sourceTree = ""; 122 | }; 123 | BB4852E41D12252C0043366E /* MobileSubstrate */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | BB4852E51D12252C0043366E /* DynamicLibraries */, 127 | ); 128 | name = MobileSubstrate; 129 | sourceTree = ""; 130 | }; 131 | BB4852E51D12252C0043366E /* DynamicLibraries */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | BB4852E61D12252C0043366E /* loadCycript.plist */, 135 | ); 136 | name = DynamicLibraries; 137 | sourceTree = ""; 138 | }; 139 | /* End PBXGroup section */ 140 | 141 | /* Begin PBXHeadersBuildPhase section */ 142 | BB4852D11D12252B0043366E /* Headers */ = { 143 | isa = PBXHeadersBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | ); 147 | runOnlyForDeploymentPostprocessing = 0; 148 | }; 149 | /* End PBXHeadersBuildPhase section */ 150 | 151 | /* Begin PBXNativeTarget section */ 152 | BB4852D31D12252B0043366E /* loadCycript */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = BB4852E91D12252C0043366E /* Build configuration list for PBXNativeTarget "loadCycript" */; 155 | buildPhases = ( 156 | BB4852CF1D12252B0043366E /* Sources */, 157 | BB4852D01D12252B0043366E /* Frameworks */, 158 | BB4852D11D12252B0043366E /* Headers */, 159 | BB4852D21D12252B0043366E /* ShellScript */, 160 | ); 161 | buildRules = ( 162 | ); 163 | dependencies = ( 164 | ); 165 | name = loadCycript; 166 | productName = loadCycript; 167 | productReference = BB4852D41D12252B0043366E /* loadCycript.dylib */; 168 | productType = "com.apple.product-type.library.dynamic"; 169 | }; 170 | /* End PBXNativeTarget section */ 171 | 172 | /* Begin PBXProject section */ 173 | BB4852CB1D12252B0043366E /* Project object */ = { 174 | isa = PBXProject; 175 | attributes = { 176 | LastUpgradeCheck = 0730; 177 | TargetAttributes = { 178 | BB4852D31D12252B0043366E = { 179 | CreatedOnToolsVersion = 7.3.1; 180 | DevelopmentTeam = 952J324HNJ; 181 | }; 182 | }; 183 | }; 184 | buildConfigurationList = BB4852CE1D12252B0043366E /* Build configuration list for PBXProject "loadCycript" */; 185 | compatibilityVersion = "Xcode 3.2"; 186 | developmentRegion = English; 187 | hasScannedForEncodings = 0; 188 | knownRegions = ( 189 | en, 190 | ); 191 | mainGroup = BB4852CA1D12252B0043366E; 192 | productRefGroup = BB4852D51D12252B0043366E /* Products */; 193 | projectDirPath = ""; 194 | projectRoot = ""; 195 | targets = ( 196 | BB4852D31D12252B0043366E /* loadCycript */, 197 | ); 198 | }; 199 | /* End PBXProject section */ 200 | 201 | /* Begin PBXShellScriptBuildPhase section */ 202 | BB4852D21D12252B0043366E /* ShellScript */ = { 203 | isa = PBXShellScriptBuildPhase; 204 | buildActionMask = 2147483647; 205 | files = ( 206 | ); 207 | inputPaths = ( 208 | ); 209 | outputPaths = ( 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | shellPath = /bin/sh; 213 | shellScript = "/opt/iOSOpenDev/bin/iosod --xcbp"; 214 | }; 215 | /* End PBXShellScriptBuildPhase section */ 216 | 217 | /* Begin PBXSourcesBuildPhase section */ 218 | BB4852CF1D12252B0043366E /* Sources */ = { 219 | isa = PBXSourcesBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | BB4852E21D12252C0043366E /* loadCycript.mm in Sources */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | /* End PBXSourcesBuildPhase section */ 227 | 228 | /* Begin XCBuildConfiguration section */ 229 | BB4852E71D12252C0043366E /* Debug */ = { 230 | isa = XCBuildConfiguration; 231 | buildSettings = { 232 | COPY_PHASE_STRIP = NO; 233 | EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.gch (*) .DS_Store CVS .svn .git .hg *.xcodeproj *.xcode *.pbproj *.pbxproj"; 234 | FRAMEWORK_SEARCH_PATHS = ( 235 | "$(iOSOpenDevPath)/frameworks/**", 236 | "$(SDKROOT)/System/Library/PrivateFrameworks", 237 | ); 238 | GCC_C_LANGUAGE_STANDARD = gnu99; 239 | GCC_DYNAMIC_NO_PIC = NO; 240 | GCC_OPTIMIZATION_LEVEL = 0; 241 | GCC_PREPROCESSOR_DEFINITIONS = ( 242 | "DEBUG=1", 243 | "$(inherited)", 244 | ); 245 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 246 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 247 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 248 | GCC_WARN_UNUSED_VARIABLE = YES; 249 | HEADER_SEARCH_PATHS = "$(iOSOpenDevPath)/include/**"; 250 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 251 | LIBRARY_SEARCH_PATHS = "$(iOSOpenDevPath)/lib/**"; 252 | SDKROOT = iphoneos; 253 | TARGETED_DEVICE_FAMILY = "1,2"; 254 | VALIDATE_PRODUCT = NO; 255 | iOSOpenDevPath = /opt/iOSOpenDev; 256 | }; 257 | name = Debug; 258 | }; 259 | BB4852E81D12252C0043366E /* Release */ = { 260 | isa = XCBuildConfiguration; 261 | buildSettings = { 262 | COPY_PHASE_STRIP = YES; 263 | EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.gch (*) .DS_Store CVS .svn .git .hg *.xcodeproj *.xcode *.pbproj *.pbxproj"; 264 | FRAMEWORK_SEARCH_PATHS = ( 265 | "$(iOSOpenDevPath)/frameworks/**", 266 | "$(SDKROOT)/System/Library/PrivateFrameworks", 267 | ); 268 | GCC_C_LANGUAGE_STANDARD = gnu99; 269 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 271 | GCC_WARN_UNUSED_VARIABLE = YES; 272 | HEADER_SEARCH_PATHS = "$(iOSOpenDevPath)/include/**"; 273 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 274 | LIBRARY_SEARCH_PATHS = "$(iOSOpenDevPath)/lib/**"; 275 | SDKROOT = iphoneos; 276 | TARGETED_DEVICE_FAMILY = "1,2"; 277 | VALIDATE_PRODUCT = YES; 278 | iOSOpenDevPath = /opt/iOSOpenDev; 279 | }; 280 | name = Release; 281 | }; 282 | BB4852EA1D12252C0043366E /* Debug */ = { 283 | isa = XCBuildConfiguration; 284 | buildSettings = { 285 | CODE_SIGN_IDENTITY = ""; 286 | DYLIB_COMPATIBILITY_VERSION = 1; 287 | DYLIB_CURRENT_VERSION = 1; 288 | ENABLE_BITCODE = NO; 289 | FRAMEWORK_SEARCH_PATHS = ( 290 | "$(inherited)", 291 | "$(PROJECT_DIR)", 292 | ); 293 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 294 | GCC_PREFIX_HEADER = "loadCycript/loadCycript-Prefix.pch"; 295 | INSTALL_PATH = /Library/MobileSubstrate/DynamicLibraries; 296 | PRODUCT_NAME = "$(TARGET_NAME)"; 297 | iOSOpenDevBuildPackageOnAnyBuild = NO; 298 | iOSOpenDevCopyOnBuild = NO; 299 | iOSOpenDevDevice = ""; 300 | iOSOpenDevInstallOnAnyBuild = NO; 301 | iOSOpenDevInstallOnProfiling = YES; 302 | iOSOpenDevRespringOnInstall = YES; 303 | iOSOpenDevUsePackageVersionPList = YES; 304 | }; 305 | name = Debug; 306 | }; 307 | BB4852EB1D12252C0043366E /* Release */ = { 308 | isa = XCBuildConfiguration; 309 | buildSettings = { 310 | CODE_SIGN_IDENTITY = ""; 311 | DYLIB_COMPATIBILITY_VERSION = 1; 312 | DYLIB_CURRENT_VERSION = 1; 313 | ENABLE_BITCODE = NO; 314 | FRAMEWORK_SEARCH_PATHS = ( 315 | "$(inherited)", 316 | "$(PROJECT_DIR)", 317 | ); 318 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 319 | GCC_PREFIX_HEADER = "loadCycript/loadCycript-Prefix.pch"; 320 | INSTALL_PATH = /Library/MobileSubstrate/DynamicLibraries; 321 | PRODUCT_NAME = "$(TARGET_NAME)"; 322 | iOSOpenDevBuildPackageOnAnyBuild = NO; 323 | iOSOpenDevCopyOnBuild = NO; 324 | iOSOpenDevDevice = ""; 325 | iOSOpenDevInstallOnAnyBuild = NO; 326 | iOSOpenDevInstallOnProfiling = YES; 327 | iOSOpenDevRespringOnInstall = YES; 328 | iOSOpenDevUsePackageVersionPList = YES; 329 | }; 330 | name = Release; 331 | }; 332 | /* End XCBuildConfiguration section */ 333 | 334 | /* Begin XCConfigurationList section */ 335 | BB4852CE1D12252B0043366E /* Build configuration list for PBXProject "loadCycript" */ = { 336 | isa = XCConfigurationList; 337 | buildConfigurations = ( 338 | BB4852E71D12252C0043366E /* Debug */, 339 | BB4852E81D12252C0043366E /* Release */, 340 | ); 341 | defaultConfigurationIsVisible = 0; 342 | defaultConfigurationName = Release; 343 | }; 344 | BB4852E91D12252C0043366E /* Build configuration list for PBXNativeTarget "loadCycript" */ = { 345 | isa = XCConfigurationList; 346 | buildConfigurations = ( 347 | BB4852EA1D12252C0043366E /* Debug */, 348 | BB4852EB1D12252C0043366E /* Release */, 349 | ); 350 | defaultConfigurationIsVisible = 0; 351 | }; 352 | /* End XCConfigurationList section */ 353 | }; 354 | rootObject = BB4852CB1D12252B0043366E /* Project object */; 355 | } 356 | -------------------------------------------------------------------------------- /loadCycript/loadCycript.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /loadCycript/loadCycript.xcodeproj/project.xcworkspace/xcuserdata/eular.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/loadCycript/loadCycript.xcodeproj/project.xcworkspace/xcuserdata/eular.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /loadCycript/loadCycript.xcodeproj/xcuserdata/eular.xcuserdatad/xcschemes/loadCycript.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /loadCycript/loadCycript.xcodeproj/xcuserdata/eular.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | loadCycript.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | BB4852D31D12252B0043366E 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /loadCycript/loadCycript/Package/DEBIAN/control: -------------------------------------------------------------------------------- 1 | Package: com.eular.loadCycript 2 | Name: loadCycript 3 | Version: 0.1-1 4 | Description: 5 | Section: Tweaks 6 | Depends: firmware (>= 5.0), mobilesubstrate 7 | Conflicts: 8 | Replaces: 9 | Priority: optional 10 | Architecture: iphoneos-arm 11 | Author: Eular 12 | dev: 13 | Homepage: 14 | Depiction: 15 | Maintainer: 16 | Icon: 17 | 18 | -------------------------------------------------------------------------------- /loadCycript/loadCycript/Package/DEBIAN/control.txt: -------------------------------------------------------------------------------- 1 | 2 | The control file in the same directory as this file is the Debian control file that is needed 3 | to build the project's Debian package that's used by APT repositories like Cydia. 4 | 5 | For more on... 6 | Debian packages, see http://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html. 7 | Debian control files, see http://www.debian.org/doc/debian-policy/ch-controlfields.html. 8 | Cydia packages, see http://www.saurik.com/id/7. 9 | 10 | Note: This file (control.txt) was created only to provide an explaination about the Debian control file. This file can now be deleted. 11 | -------------------------------------------------------------------------------- /loadCycript/loadCycript/Package/Library/MobileSubstrate/DynamicLibraries/loadCycript.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Filter 6 | 7 | Classes 8 | 9 | CoreFoundationVersion 10 | 11 | Executables 12 | 13 | Bundles 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /loadCycript/loadCycript/PackageVersion.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BugFix 6 | 7 | Major 8 | 1 9 | Minor 10 | 0 11 | PackageRevision 12 | 1 13 | Stage 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /loadCycript/loadCycript/loadCycript-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'loadCycript' target in the 'loadCycript' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /loadCycript/loadCycript/loadCycript.mm: -------------------------------------------------------------------------------- 1 | // 2 | // loadCycript.mm 3 | // loadCycript 4 | // 5 | // Created by Eular on 6/16/16. 6 | // Copyright (c) 2016 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #define CYCRIPT_PORT 8888 13 | 14 | CHDeclareClass(UIApplication); 15 | CHDeclareClass(MicroMessengerAppDelegate); 16 | 17 | CHOptimizedMethod2(self, void, MicroMessengerAppDelegate, application, UIApplication *, application, didFinishLaunchingWithOptions, NSDictionary *, options) 18 | { 19 | CHSuper2(MicroMessengerAppDelegate, application, application, didFinishLaunchingWithOptions, options); 20 | 21 | NSLog(@"## Start Cycript ##"); 22 | CYListenServer(CYCRIPT_PORT); 23 | } 24 | 25 | 26 | CHConstructor { 27 | @autoreleasepool { 28 | CHLoadLateClass(MicroMessengerAppDelegate); 29 | CHHook2(MicroMessengerAppDelegate, application, didFinishLaunchingWithOptions); 30 | } 31 | } -------------------------------------------------------------------------------- /weixinWalk/LatestBuild: -------------------------------------------------------------------------------- 1 | /Users/eular/Library/Developer/Xcode/DerivedData/weixinWalk-eygmwphfkndfcjfevurlmomlysru/Build/Products/Debug-iphoneos -------------------------------------------------------------------------------- /weixinWalk/weixinWalk.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | BB36E9011D16C856001B7FDC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB36E9001D16C856001B7FDC /* Foundation.framework */; }; 11 | BB36E90B1D16C856001B7FDC /* weixinWalk.mm in Sources */ = {isa = PBXBuildFile; fileRef = BB36E90A1D16C856001B7FDC /* weixinWalk.mm */; }; 12 | BB36E9161D16D0FC001B7FDC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB36E9151D16D0FC001B7FDC /* UIKit.framework */; }; 13 | /* End PBXBuildFile section */ 14 | 15 | /* Begin PBXFileReference section */ 16 | BB36E8FD1D16C856001B7FDC /* weixinWalk.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = weixinWalk.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 17 | BB36E9001D16C856001B7FDC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 18 | BB36E9051D16C856001B7FDC /* control.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = control.txt; path = Package/DEBIAN/control.txt; sourceTree = ""; }; 19 | BB36E9061D16C856001B7FDC /* control */ = {isa = PBXFileReference; lastKnownFileType = text; name = control; path = Package/DEBIAN/control; sourceTree = ""; }; 20 | BB36E9081D16C856001B7FDC /* PackageVersion.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PackageVersion.plist; sourceTree = ""; }; 21 | BB36E9091D16C856001B7FDC /* weixinWalk-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "weixinWalk-Prefix.pch"; sourceTree = ""; }; 22 | BB36E90A1D16C856001B7FDC /* weixinWalk.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = weixinWalk.mm; sourceTree = ""; }; 23 | BB36E90F1D16C856001B7FDC /* weixinWalk.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = weixinWalk.plist; path = Package/Library/MobileSubstrate/DynamicLibraries/weixinWalk.plist; sourceTree = ""; }; 24 | BB36E9151D16D0FC001B7FDC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 25 | /* End PBXFileReference section */ 26 | 27 | /* Begin PBXFrameworksBuildPhase section */ 28 | BB36E8F91D16C856001B7FDC /* Frameworks */ = { 29 | isa = PBXFrameworksBuildPhase; 30 | buildActionMask = 2147483647; 31 | files = ( 32 | BB36E9161D16D0FC001B7FDC /* UIKit.framework in Frameworks */, 33 | BB36E9011D16C856001B7FDC /* Foundation.framework in Frameworks */, 34 | ); 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXFrameworksBuildPhase section */ 38 | 39 | /* Begin PBXGroup section */ 40 | BB36E8F31D16C856001B7FDC = { 41 | isa = PBXGroup; 42 | children = ( 43 | BB36E9021D16C856001B7FDC /* weixinWalk */, 44 | BB36E8FF1D16C856001B7FDC /* Frameworks */, 45 | BB36E8FE1D16C856001B7FDC /* Products */, 46 | ); 47 | sourceTree = ""; 48 | }; 49 | BB36E8FE1D16C856001B7FDC /* Products */ = { 50 | isa = PBXGroup; 51 | children = ( 52 | BB36E8FD1D16C856001B7FDC /* weixinWalk.dylib */, 53 | ); 54 | name = Products; 55 | sourceTree = ""; 56 | }; 57 | BB36E8FF1D16C856001B7FDC /* Frameworks */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | BB36E9151D16D0FC001B7FDC /* UIKit.framework */, 61 | BB36E9001D16C856001B7FDC /* Foundation.framework */, 62 | ); 63 | name = Frameworks; 64 | sourceTree = ""; 65 | }; 66 | BB36E9021D16C856001B7FDC /* weixinWalk */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | BB36E90A1D16C856001B7FDC /* weixinWalk.mm */, 70 | BB36E9031D16C856001B7FDC /* Package */, 71 | BB36E9071D16C856001B7FDC /* Supporting Files */, 72 | ); 73 | path = weixinWalk; 74 | sourceTree = ""; 75 | }; 76 | BB36E9031D16C856001B7FDC /* Package */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | BB36E9041D16C856001B7FDC /* DEBIAN */, 80 | BB36E90C1D16C856001B7FDC /* Library */, 81 | ); 82 | name = Package; 83 | sourceTree = ""; 84 | }; 85 | BB36E9041D16C856001B7FDC /* DEBIAN */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | BB36E9051D16C856001B7FDC /* control.txt */, 89 | BB36E9061D16C856001B7FDC /* control */, 90 | ); 91 | name = DEBIAN; 92 | sourceTree = ""; 93 | }; 94 | BB36E9071D16C856001B7FDC /* Supporting Files */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | BB36E9081D16C856001B7FDC /* PackageVersion.plist */, 98 | BB36E9091D16C856001B7FDC /* weixinWalk-Prefix.pch */, 99 | ); 100 | name = "Supporting Files"; 101 | sourceTree = ""; 102 | }; 103 | BB36E90C1D16C856001B7FDC /* Library */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | BB36E90D1D16C856001B7FDC /* MobileSubstrate */, 107 | ); 108 | name = Library; 109 | sourceTree = ""; 110 | }; 111 | BB36E90D1D16C856001B7FDC /* MobileSubstrate */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | BB36E90E1D16C856001B7FDC /* DynamicLibraries */, 115 | ); 116 | name = MobileSubstrate; 117 | sourceTree = ""; 118 | }; 119 | BB36E90E1D16C856001B7FDC /* DynamicLibraries */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | BB36E90F1D16C856001B7FDC /* weixinWalk.plist */, 123 | ); 124 | name = DynamicLibraries; 125 | sourceTree = ""; 126 | }; 127 | /* End PBXGroup section */ 128 | 129 | /* Begin PBXHeadersBuildPhase section */ 130 | BB36E8FA1D16C856001B7FDC /* Headers */ = { 131 | isa = PBXHeadersBuildPhase; 132 | buildActionMask = 2147483647; 133 | files = ( 134 | ); 135 | runOnlyForDeploymentPostprocessing = 0; 136 | }; 137 | /* End PBXHeadersBuildPhase section */ 138 | 139 | /* Begin PBXNativeTarget section */ 140 | BB36E8FC1D16C856001B7FDC /* weixinWalk */ = { 141 | isa = PBXNativeTarget; 142 | buildConfigurationList = BB36E9121D16C856001B7FDC /* Build configuration list for PBXNativeTarget "weixinWalk" */; 143 | buildPhases = ( 144 | BB36E8F81D16C856001B7FDC /* Sources */, 145 | BB36E8F91D16C856001B7FDC /* Frameworks */, 146 | BB36E8FA1D16C856001B7FDC /* Headers */, 147 | BB36E8FB1D16C856001B7FDC /* ShellScript */, 148 | ); 149 | buildRules = ( 150 | ); 151 | dependencies = ( 152 | ); 153 | name = weixinWalk; 154 | productName = weixinWalk; 155 | productReference = BB36E8FD1D16C856001B7FDC /* weixinWalk.dylib */; 156 | productType = "com.apple.product-type.library.dynamic"; 157 | }; 158 | /* End PBXNativeTarget section */ 159 | 160 | /* Begin PBXProject section */ 161 | BB36E8F41D16C856001B7FDC /* Project object */ = { 162 | isa = PBXProject; 163 | attributes = { 164 | LastUpgradeCheck = 0800; 165 | TargetAttributes = { 166 | BB36E8FC1D16C856001B7FDC = { 167 | CreatedOnToolsVersion = 7.3.1; 168 | DevelopmentTeam = 952J324HNJ; 169 | }; 170 | }; 171 | }; 172 | buildConfigurationList = BB36E8F71D16C856001B7FDC /* Build configuration list for PBXProject "weixinWalk" */; 173 | compatibilityVersion = "Xcode 3.2"; 174 | developmentRegion = English; 175 | hasScannedForEncodings = 0; 176 | knownRegions = ( 177 | en, 178 | ); 179 | mainGroup = BB36E8F31D16C856001B7FDC; 180 | productRefGroup = BB36E8FE1D16C856001B7FDC /* Products */; 181 | projectDirPath = ""; 182 | projectRoot = ""; 183 | targets = ( 184 | BB36E8FC1D16C856001B7FDC /* weixinWalk */, 185 | ); 186 | }; 187 | /* End PBXProject section */ 188 | 189 | /* Begin PBXShellScriptBuildPhase section */ 190 | BB36E8FB1D16C856001B7FDC /* ShellScript */ = { 191 | isa = PBXShellScriptBuildPhase; 192 | buildActionMask = 2147483647; 193 | files = ( 194 | ); 195 | inputPaths = ( 196 | ); 197 | outputPaths = ( 198 | ); 199 | runOnlyForDeploymentPostprocessing = 0; 200 | shellPath = /bin/sh; 201 | shellScript = "/opt/iOSOpenDev/bin/iosod --xcbp"; 202 | }; 203 | /* End PBXShellScriptBuildPhase section */ 204 | 205 | /* Begin PBXSourcesBuildPhase section */ 206 | BB36E8F81D16C856001B7FDC /* Sources */ = { 207 | isa = PBXSourcesBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | BB36E90B1D16C856001B7FDC /* weixinWalk.mm in Sources */, 211 | ); 212 | runOnlyForDeploymentPostprocessing = 0; 213 | }; 214 | /* End PBXSourcesBuildPhase section */ 215 | 216 | /* Begin XCBuildConfiguration section */ 217 | BB36E9101D16C856001B7FDC /* Debug */ = { 218 | isa = XCBuildConfiguration; 219 | buildSettings = { 220 | CLANG_WARN_BOOL_CONVERSION = YES; 221 | CLANG_WARN_CONSTANT_CONVERSION = YES; 222 | CLANG_WARN_EMPTY_BODY = YES; 223 | CLANG_WARN_ENUM_CONVERSION = YES; 224 | CLANG_WARN_INT_CONVERSION = YES; 225 | CLANG_WARN_UNREACHABLE_CODE = YES; 226 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 227 | CODE_SIGN_IDENTITY = ""; 228 | COPY_PHASE_STRIP = NO; 229 | ENABLE_STRICT_OBJC_MSGSEND = YES; 230 | ENABLE_TESTABILITY = YES; 231 | EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.gch (*) .DS_Store CVS .svn .git .hg *.xcodeproj *.xcode *.pbproj *.pbxproj"; 232 | FRAMEWORK_SEARCH_PATHS = ( 233 | "$(iOSOpenDevPath)/frameworks/**", 234 | "$(SDKROOT)/System/Library/PrivateFrameworks", 235 | ); 236 | GCC_C_LANGUAGE_STANDARD = gnu99; 237 | GCC_DYNAMIC_NO_PIC = NO; 238 | GCC_NO_COMMON_BLOCKS = YES; 239 | GCC_OPTIMIZATION_LEVEL = 0; 240 | GCC_PREPROCESSOR_DEFINITIONS = ( 241 | "DEBUG=1", 242 | "$(inherited)", 243 | ); 244 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 245 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 246 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 247 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 248 | GCC_WARN_UNDECLARED_SELECTOR = YES; 249 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 250 | GCC_WARN_UNUSED_FUNCTION = YES; 251 | GCC_WARN_UNUSED_VARIABLE = YES; 252 | HEADER_SEARCH_PATHS = "$(iOSOpenDevPath)/include/**"; 253 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 254 | LIBRARY_SEARCH_PATHS = "$(iOSOpenDevPath)/lib/**"; 255 | ONLY_ACTIVE_ARCH = YES; 256 | SDKROOT = iphoneos; 257 | TARGETED_DEVICE_FAMILY = "1,2"; 258 | VALIDATE_PRODUCT = NO; 259 | iOSOpenDevPath = /opt/iOSOpenDev; 260 | }; 261 | name = Debug; 262 | }; 263 | BB36E9111D16C856001B7FDC /* Release */ = { 264 | isa = XCBuildConfiguration; 265 | buildSettings = { 266 | CLANG_WARN_BOOL_CONVERSION = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_EMPTY_BODY = YES; 269 | CLANG_WARN_ENUM_CONVERSION = YES; 270 | CLANG_WARN_INT_CONVERSION = YES; 271 | CLANG_WARN_UNREACHABLE_CODE = YES; 272 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 273 | CODE_SIGN_IDENTITY = ""; 274 | COPY_PHASE_STRIP = YES; 275 | ENABLE_STRICT_OBJC_MSGSEND = YES; 276 | EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.gch (*) .DS_Store CVS .svn .git .hg *.xcodeproj *.xcode *.pbproj *.pbxproj"; 277 | FRAMEWORK_SEARCH_PATHS = ( 278 | "$(iOSOpenDevPath)/frameworks/**", 279 | "$(SDKROOT)/System/Library/PrivateFrameworks", 280 | ); 281 | GCC_C_LANGUAGE_STANDARD = gnu99; 282 | GCC_NO_COMMON_BLOCKS = YES; 283 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 284 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 285 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 286 | GCC_WARN_UNDECLARED_SELECTOR = YES; 287 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 288 | GCC_WARN_UNUSED_FUNCTION = YES; 289 | GCC_WARN_UNUSED_VARIABLE = YES; 290 | HEADER_SEARCH_PATHS = "$(iOSOpenDevPath)/include/**"; 291 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 292 | LIBRARY_SEARCH_PATHS = "$(iOSOpenDevPath)/lib/**"; 293 | SDKROOT = iphoneos; 294 | TARGETED_DEVICE_FAMILY = "1,2"; 295 | VALIDATE_PRODUCT = YES; 296 | iOSOpenDevPath = /opt/iOSOpenDev; 297 | }; 298 | name = Release; 299 | }; 300 | BB36E9131D16C856001B7FDC /* Debug */ = { 301 | isa = XCBuildConfiguration; 302 | buildSettings = { 303 | CODE_SIGN_IDENTITY = "iPhone Developer: 1336006643@qq.com (7Z47763Z65)"; 304 | DYLIB_COMPATIBILITY_VERSION = 1; 305 | DYLIB_CURRENT_VERSION = 1; 306 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 307 | GCC_PREFIX_HEADER = "weixinWalk/weixinWalk-Prefix.pch"; 308 | INSTALL_PATH = /Library/MobileSubstrate/DynamicLibraries; 309 | PRODUCT_NAME = "$(TARGET_NAME)"; 310 | iOSOpenDevBuildPackageOnAnyBuild = NO; 311 | iOSOpenDevCopyOnBuild = NO; 312 | iOSOpenDevDevice = ""; 313 | iOSOpenDevInstallOnAnyBuild = NO; 314 | iOSOpenDevInstallOnProfiling = YES; 315 | iOSOpenDevRespringOnInstall = YES; 316 | iOSOpenDevUsePackageVersionPList = YES; 317 | }; 318 | name = Debug; 319 | }; 320 | BB36E9141D16C856001B7FDC /* Release */ = { 321 | isa = XCBuildConfiguration; 322 | buildSettings = { 323 | CODE_SIGN_IDENTITY = "iPhone Developer: 1336006643@qq.com (7Z47763Z65)"; 324 | DYLIB_COMPATIBILITY_VERSION = 1; 325 | DYLIB_CURRENT_VERSION = 1; 326 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 327 | GCC_PREFIX_HEADER = "weixinWalk/weixinWalk-Prefix.pch"; 328 | INSTALL_PATH = /Library/MobileSubstrate/DynamicLibraries; 329 | PRODUCT_NAME = "$(TARGET_NAME)"; 330 | iOSOpenDevBuildPackageOnAnyBuild = NO; 331 | iOSOpenDevCopyOnBuild = NO; 332 | iOSOpenDevDevice = ""; 333 | iOSOpenDevInstallOnAnyBuild = NO; 334 | iOSOpenDevInstallOnProfiling = YES; 335 | iOSOpenDevRespringOnInstall = YES; 336 | iOSOpenDevUsePackageVersionPList = YES; 337 | }; 338 | name = Release; 339 | }; 340 | /* End XCBuildConfiguration section */ 341 | 342 | /* Begin XCConfigurationList section */ 343 | BB36E8F71D16C856001B7FDC /* Build configuration list for PBXProject "weixinWalk" */ = { 344 | isa = XCConfigurationList; 345 | buildConfigurations = ( 346 | BB36E9101D16C856001B7FDC /* Debug */, 347 | BB36E9111D16C856001B7FDC /* Release */, 348 | ); 349 | defaultConfigurationIsVisible = 0; 350 | defaultConfigurationName = Release; 351 | }; 352 | BB36E9121D16C856001B7FDC /* Build configuration list for PBXNativeTarget "weixinWalk" */ = { 353 | isa = XCConfigurationList; 354 | buildConfigurations = ( 355 | BB36E9131D16C856001B7FDC /* Debug */, 356 | BB36E9141D16C856001B7FDC /* Release */, 357 | ); 358 | defaultConfigurationIsVisible = 0; 359 | defaultConfigurationName = Release; 360 | }; 361 | /* End XCConfigurationList section */ 362 | }; 363 | rootObject = BB36E8F41D16C856001B7FDC /* Project object */; 364 | } 365 | -------------------------------------------------------------------------------- /weixinWalk/weixinWalk.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /weixinWalk/weixinWalk.xcodeproj/project.xcworkspace/xcuserdata/eular.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/iOSAppHook/a688e93d2a18fc84ce6bae6dc3e690f4e7e28daa/weixinWalk/weixinWalk.xcodeproj/project.xcworkspace/xcuserdata/eular.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /weixinWalk/weixinWalk.xcodeproj/xcuserdata/eular.xcuserdatad/xcschemes/weixinWalk.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /weixinWalk/weixinWalk.xcodeproj/xcuserdata/eular.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | weixinWalk.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | BB36E8FC1D16C856001B7FDC 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /weixinWalk/weixinWalk/Package/DEBIAN/control: -------------------------------------------------------------------------------- 1 | Package: com.eular.weixinWalk 2 | Name: weixinWalk 3 | Version: 0.1-1 4 | Description: 5 | Section: Tweaks 6 | Depends: firmware (>= 5.0), mobilesubstrate 7 | Conflicts: 8 | Replaces: 9 | Priority: optional 10 | Architecture: iphoneos-arm 11 | Author: Eular 12 | dev: 13 | Homepage: 14 | Depiction: 15 | Maintainer: 16 | Icon: 17 | 18 | -------------------------------------------------------------------------------- /weixinWalk/weixinWalk/Package/DEBIAN/control.txt: -------------------------------------------------------------------------------- 1 | 2 | The control file in the same directory as this file is the Debian control file that is needed 3 | to build the project's Debian package that's used by APT repositories like Cydia. 4 | 5 | For more on... 6 | Debian packages, see http://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html. 7 | Debian control files, see http://www.debian.org/doc/debian-policy/ch-controlfields.html. 8 | Cydia packages, see http://www.saurik.com/id/7. 9 | 10 | Note: This file (control.txt) was created only to provide an explaination about the Debian control file. This file can now be deleted. 11 | -------------------------------------------------------------------------------- /weixinWalk/weixinWalk/Package/Library/MobileSubstrate/DynamicLibraries/weixinWalk.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Filter 6 | 7 | Classes 8 | 9 | CoreFoundationVersion 10 | 11 | Executables 12 | 13 | Bundles 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /weixinWalk/weixinWalk/PackageVersion.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BugFix 6 | 7 | Major 8 | 1 9 | Minor 10 | 0 11 | PackageRevision 12 | 1 13 | Stage 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /weixinWalk/weixinWalk/weixinWalk-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'weixinWalk' target in the 'weixinWalk' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /weixinWalk/weixinWalk/weixinWalk.mm: -------------------------------------------------------------------------------- 1 | // 2 | // weixinWalk.mm 3 | // weixinWalk 4 | // 5 | // Created by Eular on 6/19/16. 6 | // Copyright (c) 2016 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | // CaptainHook by Ryan Petrich 10 | // see https://github.com/rpetrich/CaptainHook/ 11 | 12 | #import 13 | #import 14 | #import "CaptainHook/CaptainHook.h" 15 | 16 | CHDeclareClass(WCDeviceStepObject); 17 | 18 | CHPropertyGetter(WCDeviceStepObject, m7StepCount, unsigned int) 19 | { 20 | NSLog(@"## Weixin Walk ##"); 21 | return 23333; 22 | } 23 | 24 | 25 | // Alert 26 | //UIAlertController *alertView = [UIAlertController alertControllerWithTitle:@"Urinx" message:@"test" preferredStyle: UIAlertControllerStyleAlert]; 27 | //UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil]; 28 | //UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"好的" style:UIAlertActionStyleDefault handler:nil]; 29 | //[alertView addAction:cancelAction]; 30 | //[alertView addAction:okAction]; 31 | //[self presentViewController:alertView animated:YES completion:nil]; 32 | 33 | 34 | CHConstructor 35 | { 36 | @autoreleasepool 37 | { 38 | CHLoadLateClass(WCDeviceStepObject); 39 | CHHook(0, WCDeviceStepObject, m7StepCount); 40 | } 41 | } 42 | --------------------------------------------------------------------------------