├── .gitignore ├── EFIgy.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── EFIgy.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── EFIgy ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon_128x128.png │ │ ├── icon_128x128@2x.png │ │ ├── icon_16x16.png │ │ ├── icon_16x16@2x.png │ │ ├── icon_256x256.png │ │ ├── icon_256x256@2x.png │ │ ├── icon_32x32.png │ │ ├── icon_32x32@2x.png │ │ ├── icon_512x512.png │ │ └── icon_512x512@2x.png │ ├── Contents.json │ ├── check-circle-blue.imageset │ │ ├── Contents.json │ │ ├── check-circle-blue-1.png │ │ ├── check-circle-blue-2.png │ │ └── check-circle-blue.png │ ├── check-circle.imageset │ │ ├── Contents.json │ │ ├── check-circle-1.png │ │ ├── check-circle-2.png │ │ └── check-circle.png │ ├── doh.imageset │ │ ├── Contents.json │ │ ├── doh-1.png │ │ ├── doh-2.png │ │ └── doh.png │ ├── happy.imageset │ │ ├── Contents.json │ │ ├── happy-1.png │ │ ├── happy-2.png │ │ └── happy.png │ └── sad.imageset │ │ ├── Contents.json │ │ ├── sad-1.png │ │ ├── sad-2.png │ │ └── sad.png ├── Base.lproj │ └── MainMenu.xib ├── EFIgy.entitlements ├── Info.plist └── main.m ├── EFIgyTests ├── EFIgyTests.m └── Info.plist ├── ExportOptions.plist ├── LICENSE ├── Makefile ├── Podfile ├── Podfile.lock ├── README.md ├── Release.xcconfig └── resources └── images └── efigy-gui.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # CocoaPods 2 | Pods/ 3 | 4 | # Finder 5 | .DS_Store 6 | 7 | # Xcode 8 | build/ 9 | *.pbxuser 10 | !default.pbxuser 11 | *.mode1v3 12 | !default.mode1v3 13 | *.mode2v3 14 | !default.mode2v3 15 | *.perspectivev3 16 | !default.perspectivev3 17 | xcuserdata 18 | *.xccheckout 19 | *.moved-aside 20 | DerivedData 21 | *.hmap 22 | *.ipa 23 | *.xcuserstate 24 | *.orig 25 | 26 | # Archives 27 | buildArchive/ 28 | *.xcarchive 29 | -------------------------------------------------------------------------------- /EFIgy.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 57291B0F1F86A479009C7BEE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 57291B0E1F86A479009C7BEE /* AppDelegate.m */; }; 11 | 57291B111F86A479009C7BEE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 57291B101F86A479009C7BEE /* Assets.xcassets */; }; 12 | 57291B141F86A479009C7BEE /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 57291B121F86A479009C7BEE /* MainMenu.xib */; }; 13 | 57291B171F86A479009C7BEE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 57291B161F86A479009C7BEE /* main.m */; }; 14 | 57291B221F86A479009C7BEE /* EFIgyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 57291B211F86A479009C7BEE /* EFIgyTests.m */; }; 15 | 57291B2E1F86AC9C009C7BEE /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57291B2D1F86AC9C009C7BEE /* IOKit.framework */; }; 16 | 57F9E1EE1FB8EF4F0033C6D3 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57F9E1ED1FB8EF410033C6D3 /* QuartzCore.framework */; }; 17 | E7C9A9E0EF36ABA99A610CAE /* Pods_EFIgy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C5DCF54285F6F23935B75CB /* Pods_EFIgy.framework */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 57291B1E1F86A479009C7BEE /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 57291B021F86A479009C7BEE /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 57291B091F86A479009C7BEE; 26 | remoteInfo = EFIgy; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 3C5DCF54285F6F23935B75CB /* Pods_EFIgy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_EFIgy.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 571A5A3E2305C12D006B8E53 /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; 33 | 57291B0A1F86A479009C7BEE /* EFIgy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EFIgy.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 57291B0D1F86A479009C7BEE /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 35 | 57291B0E1F86A479009C7BEE /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 36 | 57291B101F86A479009C7BEE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 37 | 57291B131F86A479009C7BEE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 38 | 57291B151F86A479009C7BEE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | 57291B161F86A479009C7BEE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 40 | 57291B181F86A479009C7BEE /* EFIgy.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = EFIgy.entitlements; sourceTree = ""; }; 41 | 57291B1D1F86A479009C7BEE /* EFIgyTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EFIgyTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 57291B211F86A479009C7BEE /* EFIgyTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EFIgyTests.m; sourceTree = ""; }; 43 | 57291B231F86A479009C7BEE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | 57291B2D1F86AC9C009C7BEE /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 45 | 57F9E1ED1FB8EF410033C6D3 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 46 | 63D2BBAA90E1CA98A4F37E6B /* Pods-EFIgy.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EFIgy.release.xcconfig"; path = "Pods/Target Support Files/Pods-EFIgy/Pods-EFIgy.release.xcconfig"; sourceTree = ""; }; 47 | 81C2F63B0504A7907B9D7066 /* Pods-EFIgy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EFIgy.debug.xcconfig"; path = "Pods/Target Support Files/Pods-EFIgy/Pods-EFIgy.debug.xcconfig"; sourceTree = ""; }; 48 | /* End PBXFileReference section */ 49 | 50 | /* Begin PBXFrameworksBuildPhase section */ 51 | 57291B071F86A479009C7BEE /* Frameworks */ = { 52 | isa = PBXFrameworksBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | 57F9E1EE1FB8EF4F0033C6D3 /* QuartzCore.framework in Frameworks */, 56 | 57291B2E1F86AC9C009C7BEE /* IOKit.framework in Frameworks */, 57 | E7C9A9E0EF36ABA99A610CAE /* Pods_EFIgy.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | 57291B1A1F86A479009C7BEE /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | 57291B011F86A479009C7BEE = { 72 | isa = PBXGroup; 73 | children = ( 74 | 571A5A3E2305C12D006B8E53 /* Release.xcconfig */, 75 | 57291B0C1F86A479009C7BEE /* EFIgy */, 76 | 57291B201F86A479009C7BEE /* EFIgyTests */, 77 | 57291B0B1F86A479009C7BEE /* Products */, 78 | 57291B2C1F86AC9C009C7BEE /* Frameworks */, 79 | 8572E2EB70688A6EF82FA8FF /* Pods */, 80 | ); 81 | sourceTree = ""; 82 | }; 83 | 57291B0B1F86A479009C7BEE /* Products */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 57291B0A1F86A479009C7BEE /* EFIgy.app */, 87 | 57291B1D1F86A479009C7BEE /* EFIgyTests.xctest */, 88 | ); 89 | name = Products; 90 | sourceTree = ""; 91 | }; 92 | 57291B0C1F86A479009C7BEE /* EFIgy */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 57291B0D1F86A479009C7BEE /* AppDelegate.h */, 96 | 57291B0E1F86A479009C7BEE /* AppDelegate.m */, 97 | 57291B101F86A479009C7BEE /* Assets.xcassets */, 98 | 57291B121F86A479009C7BEE /* MainMenu.xib */, 99 | 57291B151F86A479009C7BEE /* Info.plist */, 100 | 57291B161F86A479009C7BEE /* main.m */, 101 | 57291B181F86A479009C7BEE /* EFIgy.entitlements */, 102 | ); 103 | path = EFIgy; 104 | sourceTree = ""; 105 | }; 106 | 57291B201F86A479009C7BEE /* EFIgyTests */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 57291B211F86A479009C7BEE /* EFIgyTests.m */, 110 | 57291B231F86A479009C7BEE /* Info.plist */, 111 | ); 112 | path = EFIgyTests; 113 | sourceTree = ""; 114 | }; 115 | 57291B2C1F86AC9C009C7BEE /* Frameworks */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 57F9E1ED1FB8EF410033C6D3 /* QuartzCore.framework */, 119 | 57291B2D1F86AC9C009C7BEE /* IOKit.framework */, 120 | 3C5DCF54285F6F23935B75CB /* Pods_EFIgy.framework */, 121 | ); 122 | name = Frameworks; 123 | sourceTree = ""; 124 | }; 125 | 8572E2EB70688A6EF82FA8FF /* Pods */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 81C2F63B0504A7907B9D7066 /* Pods-EFIgy.debug.xcconfig */, 129 | 63D2BBAA90E1CA98A4F37E6B /* Pods-EFIgy.release.xcconfig */, 130 | ); 131 | name = Pods; 132 | sourceTree = ""; 133 | }; 134 | /* End PBXGroup section */ 135 | 136 | /* Begin PBXNativeTarget section */ 137 | 57291B091F86A479009C7BEE /* EFIgy */ = { 138 | isa = PBXNativeTarget; 139 | buildConfigurationList = 57291B261F86A47A009C7BEE /* Build configuration list for PBXNativeTarget "EFIgy" */; 140 | buildPhases = ( 141 | E1D351456D47D1D538DFD9ED /* [CP] Check Pods Manifest.lock */, 142 | 57291B061F86A479009C7BEE /* Sources */, 143 | 57291B071F86A479009C7BEE /* Frameworks */, 144 | 57291B081F86A479009C7BEE /* Resources */, 145 | B01B80882ACE63DE6E105B2C /* [CP] Embed Pods Frameworks */, 146 | ); 147 | buildRules = ( 148 | ); 149 | dependencies = ( 150 | ); 151 | name = EFIgy; 152 | productName = EFIgy; 153 | productReference = 57291B0A1F86A479009C7BEE /* EFIgy.app */; 154 | productType = "com.apple.product-type.application"; 155 | }; 156 | 57291B1C1F86A479009C7BEE /* EFIgyTests */ = { 157 | isa = PBXNativeTarget; 158 | buildConfigurationList = 57291B291F86A47A009C7BEE /* Build configuration list for PBXNativeTarget "EFIgyTests" */; 159 | buildPhases = ( 160 | 57291B191F86A479009C7BEE /* Sources */, 161 | 57291B1A1F86A479009C7BEE /* Frameworks */, 162 | 57291B1B1F86A479009C7BEE /* Resources */, 163 | ); 164 | buildRules = ( 165 | ); 166 | dependencies = ( 167 | 57291B1F1F86A479009C7BEE /* PBXTargetDependency */, 168 | ); 169 | name = EFIgyTests; 170 | productName = EFIgyTests; 171 | productReference = 57291B1D1F86A479009C7BEE /* EFIgyTests.xctest */; 172 | productType = "com.apple.product-type.bundle.unit-test"; 173 | }; 174 | /* End PBXNativeTarget section */ 175 | 176 | /* Begin PBXProject section */ 177 | 57291B021F86A479009C7BEE /* Project object */ = { 178 | isa = PBXProject; 179 | attributes = { 180 | LastUpgradeCheck = 1030; 181 | ORGANIZATIONNAME = "Duo Security"; 182 | TargetAttributes = { 183 | 57291B091F86A479009C7BEE = { 184 | CreatedOnToolsVersion = 9.0; 185 | ProvisioningStyle = Automatic; 186 | SystemCapabilities = { 187 | com.apple.HardenedRuntime = { 188 | enabled = 1; 189 | }; 190 | }; 191 | }; 192 | 57291B1C1F86A479009C7BEE = { 193 | CreatedOnToolsVersion = 9.0; 194 | ProvisioningStyle = Automatic; 195 | TestTargetID = 57291B091F86A479009C7BEE; 196 | }; 197 | }; 198 | }; 199 | buildConfigurationList = 57291B051F86A479009C7BEE /* Build configuration list for PBXProject "EFIgy" */; 200 | compatibilityVersion = "Xcode 8.0"; 201 | developmentRegion = en; 202 | hasScannedForEncodings = 0; 203 | knownRegions = ( 204 | en, 205 | Base, 206 | ); 207 | mainGroup = 57291B011F86A479009C7BEE; 208 | productRefGroup = 57291B0B1F86A479009C7BEE /* Products */; 209 | projectDirPath = ""; 210 | projectRoot = ""; 211 | targets = ( 212 | 57291B091F86A479009C7BEE /* EFIgy */, 213 | 57291B1C1F86A479009C7BEE /* EFIgyTests */, 214 | ); 215 | }; 216 | /* End PBXProject section */ 217 | 218 | /* Begin PBXResourcesBuildPhase section */ 219 | 57291B081F86A479009C7BEE /* Resources */ = { 220 | isa = PBXResourcesBuildPhase; 221 | buildActionMask = 2147483647; 222 | files = ( 223 | 57291B111F86A479009C7BEE /* Assets.xcassets in Resources */, 224 | 57291B141F86A479009C7BEE /* MainMenu.xib in Resources */, 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | }; 228 | 57291B1B1F86A479009C7BEE /* Resources */ = { 229 | isa = PBXResourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | ); 233 | runOnlyForDeploymentPostprocessing = 0; 234 | }; 235 | /* End PBXResourcesBuildPhase section */ 236 | 237 | /* Begin PBXShellScriptBuildPhase section */ 238 | B01B80882ACE63DE6E105B2C /* [CP] Embed Pods Frameworks */ = { 239 | isa = PBXShellScriptBuildPhase; 240 | buildActionMask = 2147483647; 241 | files = ( 242 | ); 243 | inputPaths = ( 244 | "${PODS_ROOT}/Target Support Files/Pods-EFIgy/Pods-EFIgy-frameworks.sh", 245 | "${BUILT_PRODUCTS_DIR}/LetsMove/LetsMove.framework", 246 | "${PODS_ROOT}/Sparkle/Sparkle.framework", 247 | "${PODS_ROOT}/Sparkle/Sparkle.framework.dSYM", 248 | ); 249 | name = "[CP] Embed Pods Frameworks"; 250 | outputPaths = ( 251 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LetsMove.framework", 252 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Sparkle.framework", 253 | "${DWARF_DSYM_FOLDER_PATH}/Sparkle.framework.dSYM", 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | shellPath = /bin/sh; 257 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-EFIgy/Pods-EFIgy-frameworks.sh\"\n"; 258 | showEnvVarsInLog = 0; 259 | }; 260 | E1D351456D47D1D538DFD9ED /* [CP] Check Pods Manifest.lock */ = { 261 | isa = PBXShellScriptBuildPhase; 262 | buildActionMask = 2147483647; 263 | files = ( 264 | ); 265 | inputPaths = ( 266 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 267 | "${PODS_ROOT}/Manifest.lock", 268 | ); 269 | name = "[CP] Check Pods Manifest.lock"; 270 | outputPaths = ( 271 | "$(DERIVED_FILE_DIR)/Pods-EFIgy-checkManifestLockResult.txt", 272 | ); 273 | runOnlyForDeploymentPostprocessing = 0; 274 | shellPath = /bin/sh; 275 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 276 | showEnvVarsInLog = 0; 277 | }; 278 | /* End PBXShellScriptBuildPhase section */ 279 | 280 | /* Begin PBXSourcesBuildPhase section */ 281 | 57291B061F86A479009C7BEE /* Sources */ = { 282 | isa = PBXSourcesBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | 57291B171F86A479009C7BEE /* main.m in Sources */, 286 | 57291B0F1F86A479009C7BEE /* AppDelegate.m in Sources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | 57291B191F86A479009C7BEE /* Sources */ = { 291 | isa = PBXSourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 57291B221F86A479009C7BEE /* EFIgyTests.m in Sources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | /* End PBXSourcesBuildPhase section */ 299 | 300 | /* Begin PBXTargetDependency section */ 301 | 57291B1F1F86A479009C7BEE /* PBXTargetDependency */ = { 302 | isa = PBXTargetDependency; 303 | target = 57291B091F86A479009C7BEE /* EFIgy */; 304 | targetProxy = 57291B1E1F86A479009C7BEE /* PBXContainerItemProxy */; 305 | }; 306 | /* End PBXTargetDependency section */ 307 | 308 | /* Begin PBXVariantGroup section */ 309 | 57291B121F86A479009C7BEE /* MainMenu.xib */ = { 310 | isa = PBXVariantGroup; 311 | children = ( 312 | 57291B131F86A479009C7BEE /* Base */, 313 | ); 314 | name = MainMenu.xib; 315 | sourceTree = ""; 316 | }; 317 | /* End PBXVariantGroup section */ 318 | 319 | /* Begin XCBuildConfiguration section */ 320 | 57291B241F86A479009C7BEE /* Debug */ = { 321 | isa = XCBuildConfiguration; 322 | buildSettings = { 323 | ALWAYS_SEARCH_USER_PATHS = NO; 324 | CLANG_ANALYZER_NONNULL = YES; 325 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 331 | CLANG_WARN_BOOL_CONVERSION = YES; 332 | CLANG_WARN_COMMA = YES; 333 | CLANG_WARN_CONSTANT_CONVERSION = YES; 334 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 335 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 336 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 337 | CLANG_WARN_EMPTY_BODY = YES; 338 | CLANG_WARN_ENUM_CONVERSION = YES; 339 | CLANG_WARN_INFINITE_RECURSION = YES; 340 | CLANG_WARN_INT_CONVERSION = YES; 341 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 342 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 343 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 344 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 345 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 346 | CLANG_WARN_STRICT_PROTOTYPES = YES; 347 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 348 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 349 | CLANG_WARN_UNREACHABLE_CODE = YES; 350 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 351 | CODE_SIGN_IDENTITY = "-"; 352 | COPY_PHASE_STRIP = NO; 353 | DEBUG_INFORMATION_FORMAT = dwarf; 354 | ENABLE_STRICT_OBJC_MSGSEND = YES; 355 | ENABLE_TESTABILITY = YES; 356 | GCC_C_LANGUAGE_STANDARD = gnu11; 357 | GCC_DYNAMIC_NO_PIC = NO; 358 | GCC_NO_COMMON_BLOCKS = YES; 359 | GCC_OPTIMIZATION_LEVEL = 0; 360 | GCC_PREPROCESSOR_DEFINITIONS = ( 361 | "DEBUG=1", 362 | "$(inherited)", 363 | ); 364 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 365 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 366 | GCC_WARN_UNDECLARED_SELECTOR = YES; 367 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 368 | GCC_WARN_UNUSED_FUNCTION = YES; 369 | GCC_WARN_UNUSED_VARIABLE = YES; 370 | MACOSX_DEPLOYMENT_TARGET = 10.12; 371 | MTL_ENABLE_DEBUG_INFO = YES; 372 | ONLY_ACTIVE_ARCH = YES; 373 | SDKROOT = macosx; 374 | }; 375 | name = Debug; 376 | }; 377 | 57291B251F86A479009C7BEE /* Release */ = { 378 | isa = XCBuildConfiguration; 379 | buildSettings = { 380 | ALWAYS_SEARCH_USER_PATHS = NO; 381 | CLANG_ANALYZER_NONNULL = YES; 382 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 383 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 384 | CLANG_CXX_LIBRARY = "libc++"; 385 | CLANG_ENABLE_MODULES = YES; 386 | CLANG_ENABLE_OBJC_ARC = YES; 387 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 388 | CLANG_WARN_BOOL_CONVERSION = YES; 389 | CLANG_WARN_COMMA = YES; 390 | CLANG_WARN_CONSTANT_CONVERSION = YES; 391 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 392 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 393 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 394 | CLANG_WARN_EMPTY_BODY = YES; 395 | CLANG_WARN_ENUM_CONVERSION = YES; 396 | CLANG_WARN_INFINITE_RECURSION = YES; 397 | CLANG_WARN_INT_CONVERSION = YES; 398 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 399 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 400 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 401 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 402 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 403 | CLANG_WARN_STRICT_PROTOTYPES = YES; 404 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 405 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 406 | CLANG_WARN_UNREACHABLE_CODE = YES; 407 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 408 | CODE_SIGN_IDENTITY = "-"; 409 | COPY_PHASE_STRIP = NO; 410 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 411 | ENABLE_NS_ASSERTIONS = NO; 412 | ENABLE_STRICT_OBJC_MSGSEND = YES; 413 | GCC_C_LANGUAGE_STANDARD = gnu11; 414 | GCC_NO_COMMON_BLOCKS = YES; 415 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 416 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 417 | GCC_WARN_UNDECLARED_SELECTOR = YES; 418 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 419 | GCC_WARN_UNUSED_FUNCTION = YES; 420 | GCC_WARN_UNUSED_VARIABLE = YES; 421 | MACOSX_DEPLOYMENT_TARGET = 10.12; 422 | MTL_ENABLE_DEBUG_INFO = NO; 423 | SDKROOT = macosx; 424 | }; 425 | name = Release; 426 | }; 427 | 57291B271F86A47A009C7BEE /* Debug */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 81C2F63B0504A7907B9D7066 /* Pods-EFIgy.debug.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CODE_SIGN_ENTITLEMENTS = EFIgy/EFIgy.entitlements; 433 | CODE_SIGN_IDENTITY = "Mac Developer"; 434 | CODE_SIGN_STYLE = Automatic; 435 | COMBINE_HIDPI_IMAGES = YES; 436 | DEVELOPMENT_TEAM = FNN8Z5JMFP; 437 | ENABLE_HARDENED_RUNTIME = YES; 438 | INFOPLIST_FILE = EFIgy/Info.plist; 439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 440 | PRODUCT_BUNDLE_IDENTIFIER = com.duosecurity.EFIgy; 441 | PRODUCT_NAME = "$(TARGET_NAME)"; 442 | PROVISIONING_PROFILE_SPECIFIER = ""; 443 | }; 444 | name = Debug; 445 | }; 446 | 57291B281F86A47A009C7BEE /* Release */ = { 447 | isa = XCBuildConfiguration; 448 | baseConfigurationReference = 63D2BBAA90E1CA98A4F37E6B /* Pods-EFIgy.release.xcconfig */; 449 | buildSettings = { 450 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 451 | CODE_SIGN_ENTITLEMENTS = EFIgy/EFIgy.entitlements; 452 | CODE_SIGN_IDENTITY = "Mac Developer"; 453 | CODE_SIGN_STYLE = Automatic; 454 | COMBINE_HIDPI_IMAGES = YES; 455 | DEVELOPMENT_TEAM = FNN8Z5JMFP; 456 | ENABLE_HARDENED_RUNTIME = YES; 457 | INFOPLIST_FILE = EFIgy/Info.plist; 458 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 459 | PRODUCT_BUNDLE_IDENTIFIER = com.duosecurity.EFIgy; 460 | PRODUCT_NAME = "$(TARGET_NAME)"; 461 | PROVISIONING_PROFILE_SPECIFIER = ""; 462 | }; 463 | name = Release; 464 | }; 465 | 57291B2A1F86A47A009C7BEE /* Debug */ = { 466 | isa = XCBuildConfiguration; 467 | buildSettings = { 468 | BUNDLE_LOADER = "$(TEST_HOST)"; 469 | CODE_SIGN_STYLE = Automatic; 470 | COMBINE_HIDPI_IMAGES = YES; 471 | INFOPLIST_FILE = EFIgyTests/Info.plist; 472 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 473 | PRODUCT_BUNDLE_IDENTIFIER = com.duosecurity.EFIgyTests; 474 | PRODUCT_NAME = "$(TARGET_NAME)"; 475 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EFIgy.app/Contents/MacOS/EFIgy"; 476 | }; 477 | name = Debug; 478 | }; 479 | 57291B2B1F86A47A009C7BEE /* Release */ = { 480 | isa = XCBuildConfiguration; 481 | buildSettings = { 482 | BUNDLE_LOADER = "$(TEST_HOST)"; 483 | CODE_SIGN_STYLE = Automatic; 484 | COMBINE_HIDPI_IMAGES = YES; 485 | INFOPLIST_FILE = EFIgyTests/Info.plist; 486 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 487 | PRODUCT_BUNDLE_IDENTIFIER = com.duosecurity.EFIgyTests; 488 | PRODUCT_NAME = "$(TARGET_NAME)"; 489 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EFIgy.app/Contents/MacOS/EFIgy"; 490 | }; 491 | name = Release; 492 | }; 493 | /* End XCBuildConfiguration section */ 494 | 495 | /* Begin XCConfigurationList section */ 496 | 57291B051F86A479009C7BEE /* Build configuration list for PBXProject "EFIgy" */ = { 497 | isa = XCConfigurationList; 498 | buildConfigurations = ( 499 | 57291B241F86A479009C7BEE /* Debug */, 500 | 57291B251F86A479009C7BEE /* Release */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 57291B261F86A47A009C7BEE /* Build configuration list for PBXNativeTarget "EFIgy" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 57291B271F86A47A009C7BEE /* Debug */, 509 | 57291B281F86A47A009C7BEE /* Release */, 510 | ); 511 | defaultConfigurationIsVisible = 0; 512 | defaultConfigurationName = Release; 513 | }; 514 | 57291B291F86A47A009C7BEE /* Build configuration list for PBXNativeTarget "EFIgyTests" */ = { 515 | isa = XCConfigurationList; 516 | buildConfigurations = ( 517 | 57291B2A1F86A47A009C7BEE /* Debug */, 518 | 57291B2B1F86A47A009C7BEE /* Release */, 519 | ); 520 | defaultConfigurationIsVisible = 0; 521 | defaultConfigurationName = Release; 522 | }; 523 | /* End XCConfigurationList section */ 524 | }; 525 | rootObject = 57291B021F86A479009C7BEE /* Project object */; 526 | } 527 | -------------------------------------------------------------------------------- /EFIgy.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /EFIgy.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /EFIgy.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /EFIgy/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // EFIgy 4 | // 5 | // Created by James Barclay on 10/5/17. 6 | // Copyright © 2017 Duo Security. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | - (IBAction)getEFIReport:(id)sender; 14 | 15 | @property (weak) IBOutlet NSTextField *hashedSysUUIDLabel; 16 | @property (weak) IBOutlet NSTextField *hardwareVersionLabel; 17 | @property (weak) IBOutlet NSTextField *bootROMVersionLabel; 18 | @property (weak) IBOutlet NSTextField *smcVersionLabel; 19 | @property (weak) IBOutlet NSTextField *boardIDLabel; 20 | @property (weak) IBOutlet NSTextField *osVersionLabel; 21 | @property (weak) IBOutlet NSTextField *buildNumberLabel; 22 | @property (weak) IBOutlet NSImageView *logo; 23 | @property (weak) IBOutlet NSProgressIndicator *progressIndicator; 24 | @property (weak) IBOutlet NSButton *getEFIReportButton; 25 | @property (nonatomic, strong) NSView *transparentBlackView; 26 | @property (weak) IBOutlet NSView *resultsView; 27 | 28 | @property NSDictionary *results; 29 | 30 | @property NSString *boardID; 31 | @property NSString *bootROMVersion; 32 | @property NSString *machineModel; 33 | @property NSString *smcVersion; 34 | @property NSString *osVersion; 35 | @property NSString *buildNumber; 36 | @property NSString *hashedSysUUID; 37 | 38 | @property (weak) IBOutlet NSImageView *firmwareUpToDateImage; 39 | @property (weak) IBOutlet NSImageView *buildUpToDateImage; 40 | @property (weak) IBOutlet NSImageView *osUpToDateImage; 41 | @property (weak) IBOutlet NSTextField *firmwareUpToDateLabel; 42 | @property (weak) IBOutlet NSTextField *buildUpToDateLabel; 43 | @property (weak) IBOutlet NSTextField *osUpToDateLabel; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /EFIgy/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // EFIgy 4 | // 5 | // Created by James Barclay on 10/5/17. 6 | // Copyright © 2017 Duo Security. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import 11 | #include 12 | #import 13 | #import 14 | 15 | @interface AppDelegate () 16 | 17 | @property (weak) IBOutlet NSWindow *window; 18 | @end 19 | 20 | @implementation AppDelegate 21 | 22 | static NSString * const kAPIURL = @"https://api.efigy.io"; 23 | 24 | - (void)applicationWillFinishLaunching:(NSNotification *)notification 25 | { 26 | PFMoveToApplicationsFolderIfNecessary(); 27 | } 28 | 29 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 30 | { 31 | if (![self darkModeEnabled]) { 32 | _window.backgroundColor = [NSColor whiteColor]; 33 | } 34 | 35 | self.boardID = [[self class] getBoardID]; 36 | self.bootROMVersion = [[self class] getBootROMVersion]; 37 | self.machineModel = [[self class] getMachineModel]; 38 | self.smcVersion = [[self class] getSMCVersion]; 39 | self.osVersion = [[self class] getOSVersion]; 40 | self.buildNumber = [[self class] getBuildNumber]; 41 | self.hashedSysUUID = [[self class] getHashedSysUUID]; 42 | 43 | _boardIDLabel.stringValue = self.boardID != nil ? self.boardID : @""; 44 | _bootROMVersionLabel.stringValue = self.bootROMVersion != nil ? self.bootROMVersion : @""; 45 | _hardwareVersionLabel.stringValue = self.machineModel != nil ? self.machineModel : @""; 46 | // The SMC is built into the T2, so on Macs with that chip this will be `nil`. 47 | _smcVersionLabel.stringValue = self.smcVersion != nil ? self.smcVersion : @"N/A"; 48 | _osVersionLabel.stringValue = self.osVersion != nil ? self.osVersion : @""; 49 | _buildNumberLabel.stringValue = self.buildNumber != nil ? self.buildNumber : @""; 50 | } 51 | 52 | - (void)applicationWillTerminate:(NSNotification *)aNotification 53 | { 54 | // Insert code here to tear down your application 55 | } 56 | 57 | - (BOOL)darkModeEnabled 58 | { 59 | BOOL darkModeEnabled = NO; 60 | 61 | if ([[NSUserDefaults standardUserDefaults] objectForKey:@"AppleInterfaceStyle"]) { 62 | darkModeEnabled = YES; 63 | } 64 | 65 | return darkModeEnabled; 66 | } 67 | 68 | + (NSString *)getBoardID 69 | { 70 | // IOPlatformExpertDevice : IOService : IORegistryEntry : OSObject 71 | return [[self class] getIOKitData:@"IOPlatformExpertDevice" withParam:@"board-id"]; 72 | } 73 | 74 | + (NSString *)getMachineModel 75 | { 76 | // IOPlatformExpertDevice : IOService : IORegistryEntry : OSObject 77 | return [[self class] getIOKitData:@"IOPlatformExpertDevice" withParam:@"model"]; 78 | } 79 | 80 | + (NSString *)getBootROMVersion 81 | { 82 | NSString *param = @"version"; 83 | NSString *path = @"IODeviceTree:/rom"; 84 | CFStringRef parameter = (__bridge CFStringRef)param; 85 | CFDataRef data; 86 | io_service_t sv = IORegistryEntryFromPath(kIOMasterPortDefault, 87 | (const char *)[path UTF8String]); 88 | data = IORegistryEntryCreateCFProperty(sv, 89 | parameter, 90 | kCFAllocatorDefault, 0); 91 | IOObjectRelease(sv); 92 | CFIndex bufferLength = CFDataGetLength(data); 93 | UInt8 *buffer = malloc(bufferLength); 94 | CFDataGetBytes(data, CFRangeMake(0, bufferLength), (UInt8 *)buffer); 95 | 96 | if (data != NULL) { 97 | CFRelease(data); 98 | } 99 | 100 | CFStringRef string = CFStringCreateWithBytes(kCFAllocatorDefault, 101 | buffer, 102 | bufferLength, 103 | kCFStringEncodingUTF8, 104 | TRUE); 105 | free(buffer); 106 | 107 | NSString *ret = nil; 108 | if (string != NULL) { 109 | NSArray *arr = [(__bridge NSString *)string componentsSeparatedByString:@"."]; 110 | if (arr != nil && [arr count] >= 4) { 111 | NSString *bootROMVersion = [NSString stringWithFormat:@"%@.%@.%@", arr[0], arr[2], arr[3]]; 112 | ret = [bootROMVersion stringByReplacingOccurrencesOfString:@"\00" withString:@""]; 113 | } 114 | CFRelease(string); 115 | } 116 | 117 | return ret; 118 | } 119 | 120 | + (NSString *)getSMCVersion 121 | { 122 | NSString *param = @"smc-version"; 123 | NSString *ioService = @"AppleSMC"; 124 | CFStringRef parameter = (__bridge CFStringRef)param; 125 | CFStringRef string; 126 | io_service_t sv = IOServiceGetMatchingService(kIOMasterPortDefault, 127 | IOServiceMatching((const char *)[ioService UTF8String])); 128 | string = IORegistryEntryCreateCFProperty(sv, 129 | parameter, 130 | kCFAllocatorDefault, 0); 131 | IOObjectRelease(sv); 132 | 133 | if (string != NULL) { 134 | NSString *smcVersion = [(__bridge NSString *)string copy]; 135 | CFRelease(string); 136 | return [smcVersion stringByReplacingOccurrencesOfString:@"\00" withString:@""]; 137 | } 138 | 139 | return nil; 140 | } 141 | 142 | + (NSString *)getOSVersion 143 | { 144 | NSProcessInfo *pInfo = [NSProcessInfo processInfo]; 145 | NSString *versionString = [pInfo operatingSystemVersionString]; 146 | NSArray *versionArray = [versionString componentsSeparatedByString:@" "]; 147 | NSString *version = versionArray[1]; 148 | 149 | return version; 150 | } 151 | 152 | + (NSString *)getBuildNumber 153 | { 154 | NSProcessInfo *pInfo = [NSProcessInfo processInfo]; 155 | NSString *versionString = [pInfo operatingSystemVersionString]; 156 | NSArray *versionArray = [versionString componentsSeparatedByString:@" "]; 157 | NSString *version = versionArray[3]; 158 | version = [version stringByReplacingOccurrencesOfString:@")" withString:@""]; 159 | 160 | return version; 161 | } 162 | 163 | + (NSString *)getHashedSysUUID 164 | { 165 | // TODO: Gross gross gross gross 166 | NSString *macAddr = [[self class] runCommandAndReturnOutput:@"/usr/bin/python" 167 | withArgs:@[@"-c", @"from uuid import getnode; print(hex(getnode()))"]]; 168 | 169 | io_registry_entry_t ioRegistryRoot = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/"); 170 | CFStringRef uuidCf = (CFStringRef)IORegistryEntryCreateCFProperty(ioRegistryRoot, CFSTR(kIOPlatformUUIDKey), kCFAllocatorDefault, 0); 171 | IOObjectRelease(ioRegistryRoot); 172 | 173 | if (uuidCf != NULL) { 174 | NSString *uuid = (__bridge NSString *)uuidCf; 175 | 176 | // TODO: Gross gross gross gross 177 | NSString *py = [NSString stringWithFormat:@"import hashlib; print(hashlib.sha256('%@' + '%@').hexdigest())", macAddr, uuid]; 178 | NSString *hash = [[self class] runCommandAndReturnOutput:@"/usr/bin/python" 179 | withArgs:@[@"-c", [py stringByReplacingOccurrencesOfString:@"\n" withString:@""]]]; 180 | CFRelease(uuidCf); 181 | 182 | return [hash stringByReplacingOccurrencesOfString:@"\n" withString:@""]; 183 | } 184 | 185 | return nil; 186 | } 187 | 188 | + (NSString *)getIOKitData:(NSString *)ioService withParam:(NSString *)param 189 | { 190 | CFStringRef parameter = (__bridge CFStringRef)param; 191 | CFDataRef data; 192 | io_service_t sv = IOServiceGetMatchingService(kIOMasterPortDefault, 193 | IOServiceMatching((const char *)[ioService UTF8String])); 194 | data = IORegistryEntryCreateCFProperty(sv, 195 | parameter, 196 | kCFAllocatorDefault, 0); 197 | IOObjectRelease(sv); 198 | CFIndex bufferLength = CFDataGetLength(data); 199 | UInt8 *buffer = malloc(bufferLength); 200 | CFDataGetBytes(data, CFRangeMake(0, bufferLength), (UInt8 *)buffer); 201 | 202 | if (data != NULL) { 203 | CFRelease(data); 204 | } 205 | 206 | CFStringRef string = CFStringCreateWithBytes(kCFAllocatorDefault, 207 | buffer, 208 | bufferLength, 209 | kCFStringEncodingUTF8, 210 | TRUE); 211 | free(buffer); 212 | 213 | if (string != NULL) { 214 | NSString *result = [(__bridge NSString *)string copy]; 215 | CFRelease(string); 216 | 217 | return [result stringByReplacingOccurrencesOfString:@"\00" withString:@""]; 218 | } 219 | 220 | return nil; 221 | } 222 | 223 | + (NSString *)runCommandAndReturnOutput:(NSString *)launchPath withArgs:(NSArray *)args 224 | { 225 | NSTask *task = [[NSTask alloc] init]; 226 | NSPipe *pipe = [NSPipe pipe]; 227 | task.launchPath = launchPath; 228 | task.arguments = args; 229 | task.standardOutput = pipe; 230 | task.standardError = pipe; 231 | [task waitUntilExit]; 232 | [task launch]; 233 | NSData *outData = [[pipe fileHandleForReading] readDataToEndOfFile]; 234 | NSString *outString = [[NSString alloc] initWithData:outData encoding:NSUTF8StringEncoding]; 235 | 236 | return outString; 237 | } 238 | 239 | + (NSArray *)plistFromString:(NSString *)plistString 240 | { 241 | NSData *plistData = [plistString dataUsingEncoding:NSUTF8StringEncoding]; 242 | NSError *error; 243 | NSPropertyListFormat format; 244 | NSArray *plist = [NSPropertyListSerialization 245 | propertyListWithData:plistData 246 | options:NSPropertyListImmutable 247 | format:&format 248 | error:&error]; 249 | if (!plist) { 250 | NSLog(@"Error parsing property list: %@.", error.localizedDescription); 251 | return nil; 252 | } 253 | 254 | return plist; 255 | } 256 | 257 | + (NSNumber *)numberFromHexString:(NSString *)aString 258 | { 259 | if (aString) { 260 | NSScanner *scanner; 261 | unsigned int tmpInt; 262 | scanner = [NSScanner scannerWithString:aString]; 263 | [scanner scanHexInt:&tmpInt]; 264 | return [NSNumber numberWithInt:tmpInt]; 265 | } 266 | return nil; 267 | } 268 | 269 | + (NSNumber *)numberFromString:(NSString *)aString 270 | { 271 | if (aString) { 272 | NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; 273 | formatter.numberStyle = NSNumberFormatterDecimalStyle; 274 | return [formatter numberFromString:aString]; 275 | } 276 | return nil; 277 | } 278 | 279 | - (void)makeAPIGet:(NSString *)endpoint 280 | success:(void (^)(NSDictionary *responseDict))success 281 | failure:(void (^)(NSError *error))failure 282 | { 283 | NSString *urlString = [kAPIURL stringByAppendingString:endpoint]; 284 | NSString *escapedURLString = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; 285 | NSURLSession *session = [NSURLSession sharedSession]; 286 | NSURL *url = [NSURL URLWithString:escapedURLString]; 287 | 288 | NSURLSessionDataTask *task = [session dataTaskWithURL:url 289 | completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { 290 | if (error) { 291 | failure(error); 292 | } else { 293 | NSError *jsonError; 294 | NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data 295 | options:0 296 | error:&jsonError]; 297 | if (!jsonError) { 298 | success(json); 299 | } else { 300 | failure(jsonError); 301 | } 302 | } 303 | }]; 304 | [task resume]; 305 | } 306 | 307 | - (void)makeAPIPost:(NSString *)endpoint 308 | withData:(NSDictionary *)data 309 | success:(void (^)(NSDictionary *responseDict))success 310 | failure:(void (^)(NSError *error))failure 311 | { 312 | NSString *urlString = [kAPIURL stringByAppendingString:endpoint]; 313 | NSError *error; 314 | NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; 315 | NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:nil]; 316 | NSURL *url = [NSURL URLWithString:urlString]; 317 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url 318 | cachePolicy:NSURLRequestUseProtocolCachePolicy 319 | timeoutInterval:10.0]; 320 | [request addValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; 321 | [request addValue:@"application/json" forHTTPHeaderField:@"Accept"]; 322 | request.HTTPMethod = @"POST"; 323 | NSData *postData = [NSJSONSerialization dataWithJSONObject:data options:0 error:&error]; 324 | request.HTTPBody = postData; 325 | NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { 326 | if (error) { 327 | failure(error); 328 | } else { 329 | NSError *jsonError; 330 | NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data 331 | options:0 332 | error:&jsonError]; 333 | if (!jsonError) { 334 | success(json); 335 | } else { 336 | failure(jsonError); 337 | } 338 | } 339 | }]; 340 | [task resume]; 341 | } 342 | 343 | - (BOOL)validateResponse:(NSDictionary *)response 344 | { 345 | if (response[@"error"] && response[@"msg"]) { 346 | return NO; 347 | } else if (response[@"msg"]) { 348 | return YES; 349 | } 350 | return NO; 351 | } 352 | 353 | - (BOOL)arrayOfStringsContainsOnlyDigits:(NSArray *)arr 354 | { 355 | for (NSString *part in arr) { 356 | NSCharacterSet *notDigits = [[NSCharacterSet decimalDigitCharacterSet] invertedSet]; 357 | if (!([part rangeOfCharacterFromSet:notDigits].location == NSNotFound)) { 358 | return NO; 359 | } 360 | } 361 | return YES; 362 | } 363 | 364 | - (NSNumber *)getEFIVersionFromString:(NSString *)efiVersionString 365 | { 366 | NSArray *efiParts = [efiVersionString componentsSeparatedByString:@"."]; 367 | if (efiParts && (efiParts.count > 0)) { 368 | NSNumber *efiVersion; 369 | if ([self arrayOfStringsContainsOnlyDigits:efiParts]) { 370 | efiVersion = [[self class] numberFromHexString:efiParts[0]]; 371 | } else { 372 | efiVersion = [[self class] numberFromHexString:efiParts[1]]; 373 | } 374 | return efiVersion; 375 | } 376 | return nil; 377 | } 378 | 379 | - (NSNumber *)getEFIBuildFromString:(NSString *)efiVersionString 380 | { 381 | NSArray *efiParts = [efiVersionString componentsSeparatedByString:@"."]; 382 | if (efiParts && (efiParts.count > 0)) { 383 | NSNumber *efiBuild; 384 | if ([self arrayOfStringsContainsOnlyDigits:efiParts]) { 385 | efiBuild = 0; 386 | } else { 387 | efiBuild = [[self class] numberFromString: 388 | [efiParts[2] stringByReplacingOccurrencesOfString:@"B" 389 | withString:@""]]; 390 | } 391 | return efiBuild; 392 | } 393 | return nil; 394 | } 395 | 396 | - (BOOL)checkFirmwareBeingUpdated 397 | { 398 | if ([self validateResponse:self.results[@"efi_updates_relased"]]) { 399 | if (!self.results[@"efi_updates_released"][@"msg"]) { 400 | return NO; 401 | } 402 | } 403 | return YES; 404 | } 405 | 406 | - (BOOL)checkFirmwareVersions 407 | { 408 | if ([self validateResponse:self.results[@"latest_efi_version"]]) { 409 | // Newer EFI versions do not include a build number 410 | // or the Mac model code. The output will be something 411 | // like 256.0.0, whereas with the old format it would 412 | // be MBP133.0256.B00. 413 | NSNumber *myEFIVersion = [self getEFIVersionFromString:self.bootROMVersion]; 414 | NSNumber *myEFIBuild = [self getEFIBuildFromString:self.bootROMVersion]; 415 | NSNumber *apiEFIVersion = [self getEFIVersionFromString:self.results[@"latest_efi_version"][@"msg"]]; 416 | NSNumber *apiEFIBuild = [self getEFIBuildFromString:self.bootROMVersion]; 417 | if ([self.results[@"latest_efi_version"][@"msg"] isEqualToString:self.bootROMVersion]) { 418 | return YES; 419 | } else if (myEFIVersion == apiEFIVersion && myEFIBuild == apiEFIBuild) { 420 | return YES; 421 | } 422 | } 423 | return NO; 424 | } 425 | 426 | - (BOOL)checkFirmwareVersionGreaterThanKnown 427 | { 428 | if ([self validateResponse:self.results[@"latest_efi_version"]]) { 429 | NSNumber *myEFIVersion = [self getEFIVersionFromString:self.bootROMVersion]; 430 | NSNumber *myEFIBuild = [self getEFIBuildFromString:self.bootROMVersion]; 431 | NSNumber *apiEFIVersion = [self getEFIVersionFromString:self.results[@"latest_efi_version"][@"msg"]]; 432 | NSNumber *apiEFIBuild = [self getEFIBuildFromString:self.bootROMVersion]; 433 | if (([myEFIVersion isGreaterThan:apiEFIVersion]) || ([myEFIVersion isEqualToNumber:apiEFIVersion] && [myEFIBuild isGreaterThan:apiEFIBuild])) { 434 | return YES; 435 | } 436 | } 437 | return NO; 438 | } 439 | 440 | - (BOOL)checkHighestBuild 441 | { 442 | if ([self validateResponse:self.results[@"latest_build_number"]]) { 443 | if ([self.results[@"latest_build_number"][@"msg"] isEqualToString:self.buildNumber]) { 444 | return YES; 445 | } 446 | } 447 | return NO; 448 | } 449 | 450 | - (BOOL)checkBetaBuild 451 | { 452 | // Current beta builds will have a higher patch level and/or security patch level, just 453 | // as the logic goes for determining whether a build is greater than what we know about. 454 | // The difference is that beta builds will always end with a letter. So, if a beta build 455 | // has a lower patch level or security patch level than what we know about, it's likely 456 | // an out-of-date beta build. Note, however, that right now we just check whether the 457 | // build ends with a letter. 458 | if ([self validateResponse:self.results[@"latest_build_number"]]) { 459 | // If the build number ends with a letter it's a beta/development build. 460 | NSString *lastCharacter = [self.buildNumber substringFromIndex:self.buildNumber.length - 1]; 461 | NSCharacterSet *letters = [NSCharacterSet characterSetWithCharactersInString:@"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"]; 462 | letters = [letters invertedSet]; 463 | NSRange range = [lastCharacter rangeOfCharacterFromSet:letters]; 464 | if (range.location == NSNotFound) { 465 | return YES; 466 | } 467 | } 468 | return NO; 469 | } 470 | 471 | - (BOOL)checkBuildGreaterThanKnown 472 | { 473 | /* 474 | A = .0 475 | B = .1 476 | C = .2 477 | ...and so on. 478 | Letter in build number corresponds to the patch level, as noted above. 479 | Number following the letter in the build number is the build thereof. This 480 | can be 2, 3, 4, or 5 digits. If it's a forked build, the number following 481 | the letter will be 4 digits, but not all 4 digit builds are forked builds. 482 | Beta/development builds always end with a letter. We can determine if a 483 | build is newer than what's returned from the EFIgy API by first checking if 484 | the letter is higher, (e.g., D > C). If the letter is the same, we check if 485 | the build number is higher. 486 | */ 487 | if ([self checkBetaBuild]) { 488 | return NO; 489 | } 490 | NSString *expectedBuild = self.results[@"latest_build_number"][@"msg"]; 491 | NSRange actualRange = [self.buildNumber rangeOfCharacterFromSet:[NSCharacterSet letterCharacterSet]]; 492 | NSRange expectedRange = [expectedBuild rangeOfCharacterFromSet:[NSCharacterSet letterCharacterSet]]; 493 | if (actualRange.location != NSNotFound && expectedRange.location != NSNotFound) { 494 | if ([[self.buildNumber substringFromIndex:actualRange.location] length] > 1 && 495 | [[expectedBuild substringFromIndex:expectedRange.location] length] > 1) { 496 | // Assuming the current build number is 17D47, `patchLevel` would return "D", 497 | // and `securityPatchLevel` would contain "47". 498 | NSString *patchLevel = [self.buildNumber substringWithRange:actualRange]; 499 | NSString *securityPatchLevel = [self.buildNumber substringFromIndex:actualRange.location + 1]; 500 | NSString *expectedPatchLevel = [expectedBuild substringWithRange:expectedRange]; 501 | NSString *expectedSecurityPatchLevel = [expectedBuild substringFromIndex:actualRange.location + 1]; 502 | NSInteger securityPatchLevelInt = [securityPatchLevel integerValue]; 503 | NSInteger expectedSecurityPatchLevelInt = [expectedSecurityPatchLevel integerValue]; 504 | if (patchLevel && securityPatchLevel && expectedPatchLevel && expectedSecurityPatchLevel) { 505 | if ([patchLevel compare:expectedPatchLevel] == NSOrderedDescending) { 506 | // Current patch level is greater than expected patch level, 507 | // (e.g., D > C). 508 | return YES; 509 | } else if ([patchLevel isEqualToString:expectedPatchLevel] && securityPatchLevelInt > expectedSecurityPatchLevelInt) { 510 | // Current patch level is equal to expected patch level, 511 | // but security patch level is greater than expected security 512 | // patch level, (e.g., D480 > D47, because D == D && 480 > 47). 513 | return YES; 514 | } 515 | } 516 | } 517 | } 518 | return NO; 519 | } 520 | 521 | - (BOOL)checkOSUpToDate 522 | { 523 | if ([self validateResponse:self.results[@"latest_os_version"]]) { 524 | if ([self.results[@"latest_os_version"][@"msg"] isEqualToString:self.osVersion]) { 525 | return YES; 526 | } 527 | } 528 | return NO; 529 | } 530 | 531 | - (BOOL)checkOSGreaterThanKnown 532 | { 533 | if ([self validateResponse:self.results[@"latest_os_version"]]) { 534 | NSString *apiVersion = self.results[@"latest_os_version"][@"msg"]; 535 | if ([self.osVersion compare:apiVersion options:NSNumericSearch] == NSOrderedDescending) { 536 | return YES; 537 | } 538 | } 539 | return NO; 540 | } 541 | 542 | - (void)updateUI 543 | { 544 | BOOL firmwareBeingUpdated = NO; 545 | BOOL firmwareUpToDate = NO; 546 | BOOL firmwareVersionGreaterThanKnown = NO; 547 | if ([self checkFirmwareBeingUpdated]) { 548 | firmwareBeingUpdated = YES; 549 | firmwareUpToDate = [self checkFirmwareVersions]; 550 | firmwareVersionGreaterThanKnown = [self checkFirmwareVersionGreaterThanKnown]; 551 | } 552 | BOOL runningBetaBuild = [self checkBetaBuild]; 553 | BOOL runningBuildGreaterThanKnown = [self checkBuildGreaterThanKnown]; 554 | BOOL runningHighestBuild = [self checkHighestBuild]; 555 | BOOL osGreaterThanKnown = [self checkOSGreaterThanKnown]; 556 | BOOL osUpToDate = [self checkOSUpToDate]; 557 | 558 | __block NSString *firmwareUpToDateTT; 559 | __block NSString *buildUpToDateTT; 560 | __block NSString *osUpToDateTT; 561 | 562 | dispatch_async(dispatch_get_main_queue(), ^{ 563 | if (firmwareBeingUpdated && 564 | (firmwareUpToDate || firmwareVersionGreaterThanKnown) && 565 | (runningHighestBuild || runningBetaBuild || runningBuildGreaterThanKnown) && 566 | (osUpToDate || osGreaterThanKnown)) { 567 | 568 | self.logo.image = [NSImage imageNamed:@"happy"]; 569 | if (firmwareVersionGreaterThanKnown) { 570 | firmwareUpToDateTT = [NSString stringWithFormat: 571 | @"Running firmware version %@, which is newer than what we know about (%@).", 572 | self.bootROMVersion, 573 | self.results[@"latest_efi_version"][@"msg"]]; 574 | } else { 575 | firmwareUpToDateTT = [NSString stringWithFormat: 576 | @"Running expected firmware version: %@", 577 | self.bootROMVersion]; 578 | } 579 | 580 | if (runningBetaBuild) { 581 | buildUpToDateTT = [NSString stringWithFormat: 582 | @"Running beta build number: %@", 583 | self.buildNumber]; 584 | } else if (runningBuildGreaterThanKnown) { 585 | buildUpToDateTT = [NSString stringWithFormat: 586 | @"Running build number %@, which is newer than what we know about (%@).", 587 | self.buildNumber, 588 | self.results[@"latest_build_number"][@"msg"]]; 589 | } else { 590 | buildUpToDateTT = [NSString stringWithFormat: 591 | @"Running expected build number: %@", 592 | self.buildNumber]; 593 | } 594 | 595 | if (osGreaterThanKnown) { 596 | osUpToDateTT = [NSString stringWithFormat: 597 | @"Running OS version %@, which is newer than what we know about (%@).", 598 | self.osVersion, 599 | self.results[@"latest_os_version"][@"msg"]]; 600 | } else { 601 | osUpToDateTT = [NSString stringWithFormat: 602 | @"Running latest OS version: %@", 603 | self.osVersion]; 604 | } 605 | 606 | if (firmwareVersionGreaterThanKnown) { 607 | self.firmwareUpToDateLabel.stringValue = @"Running newer firmware"; 608 | } else { 609 | self.firmwareUpToDateLabel.stringValue = @"Firmware up-to-date"; 610 | } 611 | 612 | if (runningBetaBuild) { 613 | self.buildUpToDateLabel.stringValue = @"Running beta OS build"; 614 | } else if (runningBuildGreaterThanKnown) { 615 | self.buildUpToDateLabel.stringValue = @"Running newer OS build"; 616 | } else { 617 | self.buildUpToDateLabel.stringValue = @"Running latest OS build"; 618 | } 619 | 620 | if (osGreaterThanKnown) { 621 | self.osUpToDateLabel.stringValue = @"Running newer OS version"; 622 | } else { 623 | self.osUpToDateLabel.stringValue = @"Running latest OS version"; 624 | } 625 | 626 | if (firmwareVersionGreaterThanKnown) { 627 | self.firmwareUpToDateImage.image = [NSImage imageNamed:@"check-circle-blue"]; 628 | } else { 629 | self.firmwareUpToDateImage.image = [NSImage imageNamed:@"check-circle"]; 630 | } 631 | 632 | if (runningBetaBuild || runningBuildGreaterThanKnown) { 633 | self.buildUpToDateImage.image = [NSImage imageNamed:@"check-circle-blue"]; 634 | } else { 635 | self.buildUpToDateImage.image = [NSImage imageNamed:@"check-circle"]; 636 | } 637 | 638 | if (osGreaterThanKnown) { 639 | self.osUpToDateImage.image = [NSImage imageNamed:@"check-circle-blue"]; 640 | } else { 641 | self.osUpToDateImage.image = [NSImage imageNamed:@"check-circle"]; 642 | } 643 | 644 | self.firmwareUpToDateLabel.toolTip = firmwareUpToDateTT; 645 | self.firmwareUpToDateImage.toolTip = firmwareUpToDateTT; 646 | self.buildUpToDateLabel.toolTip = buildUpToDateTT; 647 | self.buildUpToDateImage.toolTip = buildUpToDateTT; 648 | self.osUpToDateLabel.toolTip = osUpToDateTT; 649 | self.osUpToDateImage.toolTip = osUpToDateTT; 650 | } else { 651 | self.logo.image = [NSImage imageNamed:@"sad"]; 652 | if (!firmwareBeingUpdated || firmwareVersionGreaterThanKnown || !firmwareUpToDate) { 653 | if (!firmwareBeingUpdated) { 654 | firmwareUpToDateTT = @"Your Mac model hasn't received any firmware updates."; 655 | self.firmwareUpToDateLabel.stringValue = @"EFI updates unavailable"; 656 | self.firmwareUpToDateImage.image = [NSImage imageNamed:NSImageNameCaution]; 657 | } else if (!firmwareUpToDate && firmwareVersionGreaterThanKnown) { 658 | firmwareUpToDateTT = [NSString stringWithFormat: 659 | @"Running firmware version %@, which is newer than what we know about (%@).", 660 | self.bootROMVersion, 661 | self.results[@"latest_efi_version"][@"msg"]]; 662 | self.firmwareUpToDateLabel.stringValue = @"Running newer firmware"; 663 | self.firmwareUpToDateImage.image = [NSImage imageNamed:@"check-circle-blue"]; 664 | } else { 665 | firmwareUpToDateTT = [NSString stringWithFormat: 666 | @"Expected firmware version: %@\n Actual firmware version: %@", 667 | self.results[@"latest_efi_version"][@"msg"], 668 | self.bootROMVersion]; 669 | self.firmwareUpToDateLabel.stringValue = @"EFI firmware out-of-date"; 670 | self.firmwareUpToDateImage.image = [NSImage imageNamed:NSImageNameCaution]; 671 | } 672 | } else { 673 | firmwareUpToDateTT = [NSString stringWithFormat: 674 | @"Running expected firmware version: %@", 675 | self.bootROMVersion]; 676 | self.firmwareUpToDateLabel.stringValue = @"Firmware up-to-date"; 677 | self.firmwareUpToDateImage.image = [NSImage imageNamed:@"check-circle"]; 678 | } 679 | 680 | self.firmwareUpToDateLabel.toolTip = firmwareUpToDateTT; 681 | self.firmwareUpToDateImage.toolTip = firmwareUpToDateTT; 682 | 683 | if (runningBetaBuild) { 684 | buildUpToDateTT = [NSString stringWithFormat: 685 | @"Running beta build number: %@", 686 | self.buildNumber]; 687 | self.buildUpToDateLabel.stringValue = @"Running beta OS build"; 688 | self.buildUpToDateImage.image = [NSImage imageNamed:@"check-circle-blue"]; 689 | } else if (runningBuildGreaterThanKnown) { 690 | buildUpToDateTT = [NSString stringWithFormat: 691 | @"Running build number %@, which is newer than what we know about (%@).", 692 | self.buildNumber, 693 | self.results[@"latest_build_number"][@"msg"]]; 694 | self.buildUpToDateLabel.stringValue = @"Running newer OS build"; 695 | self.buildUpToDateImage.image = [NSImage imageNamed:@"check-circle-blue"]; 696 | } else if (runningHighestBuild) { 697 | buildUpToDateTT = [NSString stringWithFormat: 698 | @"Running expected build number: %@", 699 | self.buildNumber]; 700 | self.buildUpToDateLabel.stringValue = @"Running latest OS build"; 701 | self.buildUpToDateImage.image = [NSImage imageNamed:@"check-circle"]; 702 | } else { 703 | buildUpToDateTT = [NSString stringWithFormat: 704 | @"Expected build number: %@\n Actual build number: %@", 705 | self.results[@"latest_build_number"][@"msg"], 706 | self.buildNumber]; 707 | self.buildUpToDateLabel.stringValue = @"OS build out-of-date"; 708 | self.buildUpToDateImage.image = [NSImage imageNamed:NSImageNameCaution]; 709 | } 710 | 711 | self.buildUpToDateLabel.toolTip = buildUpToDateTT; 712 | self.buildUpToDateImage.toolTip = buildUpToDateTT; 713 | 714 | if (!osUpToDate && osGreaterThanKnown) { 715 | osUpToDateTT = [NSString stringWithFormat: 716 | @"Running OS version %@, which is newer than what we know about (%@).", 717 | self.osVersion, 718 | self.results[@"latest_os_version"][@"msg"]]; 719 | self.osUpToDateLabel.stringValue = @"Running newer OS version"; 720 | self.osUpToDateImage.image = [NSImage imageNamed:@"check-circle-blue"]; 721 | } else if (!osUpToDate && !osGreaterThanKnown) { 722 | osUpToDateTT = [NSString stringWithFormat: 723 | @"Expected OS version: %@\n Actual OS version: %@", 724 | self.results[@"latest_os_version"][@"msg"], 725 | self.osVersion]; 726 | self.osUpToDateLabel.stringValue = @"OS out-of-date"; 727 | self.osUpToDateImage.image = [NSImage imageNamed:NSImageNameCaution]; 728 | } else { 729 | osUpToDateTT = [NSString stringWithFormat: 730 | @"Running latest OS version: %@", 731 | self.osVersion]; 732 | self.osUpToDateLabel.stringValue = @"Running latest OS version"; 733 | self.osUpToDateImage.image = [NSImage imageNamed:@"check-circle"]; 734 | } 735 | } 736 | 737 | self.osUpToDateLabel.toolTip = osUpToDateTT; 738 | self.osUpToDateImage.toolTip = osUpToDateTT; 739 | 740 | self.getEFIReportButton.enabled = YES; 741 | [self.progressIndicator stopAnimation:self]; 742 | self.progressIndicator.hidden = YES; 743 | [self.transparentBlackView removeFromSuperview]; 744 | self.resultsView.hidden = NO; 745 | [self.resultsView setWantsLayer:YES]; 746 | CGColorRef color; 747 | if ([self darkModeEnabled]) { 748 | self.firmwareUpToDateLabel.textColor = [NSColor whiteColor]; 749 | self.buildUpToDateLabel.textColor = [NSColor whiteColor]; 750 | self.osUpToDateLabel.textColor = [NSColor whiteColor]; 751 | color = CGColorCreateGenericRGB(1.0, 1.0, 1.0, 0.3); 752 | } else { 753 | color = CGColorCreateGenericRGB(0.0, 0.0, 0.0, 0.6); 754 | } 755 | if (color != NULL) { 756 | self.resultsView.layer.backgroundColor = color; 757 | self.resultsView.layerUsesCoreImageFilters = YES; 758 | CIFilter *filter = [CIFilter filterWithName:@"CIGaussianBlur"]; 759 | [filter setDefaults]; 760 | [filter setValue:[NSNumber numberWithFloat:5.0f] forKey:kCIInputRadiusKey]; 761 | self.resultsView.backgroundFilters = @[filter]; 762 | CFRelease(color); 763 | } 764 | }); 765 | } 766 | 767 | - (IBAction)getEFIReport:(id)sender 768 | { 769 | self.getEFIReportButton.enabled = NO; 770 | self.progressIndicator.hidden = NO; 771 | self.progressIndicator.layer.zPosition = 5; 772 | [self.progressIndicator startAnimation:self]; 773 | 774 | self.transparentBlackView = [[NSView alloc] initWithFrame:[[self.window contentView] frame]]; 775 | 776 | CALayer *viewLayer = [CALayer layer]; 777 | [viewLayer setBackgroundColor:CGColorCreateGenericRGB(0.0, 0.0, 0.0, 0.4)]; // RGB plus alpha channel. 778 | [self.transparentBlackView setWantsLayer:YES]; 779 | [self.transparentBlackView setLayer:viewLayer]; 780 | 781 | [[self.window contentView] addSubview:self.transparentBlackView]; 782 | 783 | NSDictionary *dataToSubmit = @{@"hashed_uuid": self.hashedSysUUID != nil ? self.hashedSysUUID : @"", 784 | @"hw_ver": self.machineModel != nil ? self.machineModel : @"", 785 | @"rom_ver": self.bootROMVersion != nil ? self.bootROMVersion : @"", 786 | @"smc_ver": self.smcVersion != nil ? self.smcVersion : @"", 787 | @"board_id": self.boardID != nil ? self.boardID : @"", 788 | @"os_ver": self.osVersion != nil ? self.osVersion : @"", 789 | @"build_num": self.buildNumber != nil ? self.buildNumber : @""}; 790 | 791 | [self makeAPIPost:@"/apple/oneshot" withData:dataToSubmit success:^(NSDictionary *responseDict) { 792 | self.results = responseDict; 793 | if (!self.results[@"efi_updates_relased"]) { 794 | NSString *endpoint = [NSString stringWithFormat:@"/apple/no_firmware_updates_released/%@", self.machineModel]; 795 | [self makeAPIGet:endpoint success:^(NSDictionary *responseDict) { 796 | [self updateUI]; 797 | } failure:^(NSError *error) { 798 | NSLog(@"Error submitting data to EFIgy API: %@", error.localizedDescription); 799 | self.logo.image = [NSImage imageNamed:@"doh"]; 800 | }]; 801 | } else { 802 | [self updateUI]; 803 | } 804 | } failure:^(NSError *error) { 805 | NSLog(@"Error submitting data to EFIgy API: %@", error.localizedDescription); 806 | dispatch_async(dispatch_get_main_queue(), ^{ 807 | self.logo.image = [NSImage imageNamed:@"doh"]; 808 | }); 809 | }]; 810 | } 811 | 812 | @end 813 | -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "icon_16x16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "icon_16x16@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "icon_32x32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "icon_32x32@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "icon_128x128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "icon_128x128@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "icon_256x256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "icon_256x256@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "icon_512x512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "icon_512x512@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/AppIcon.appiconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/AppIcon.appiconset/icon_128x128.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/AppIcon.appiconset/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/AppIcon.appiconset/icon_16x16.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/AppIcon.appiconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/AppIcon.appiconset/icon_256x256.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/AppIcon.appiconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/AppIcon.appiconset/icon_32x32.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/AppIcon.appiconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/AppIcon.appiconset/icon_512x512.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/check-circle-blue.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "check-circle-blue.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "check-circle-blue-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "check-circle-blue-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/check-circle-blue.imageset/check-circle-blue-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/check-circle-blue.imageset/check-circle-blue-1.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/check-circle-blue.imageset/check-circle-blue-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/check-circle-blue.imageset/check-circle-blue-2.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/check-circle-blue.imageset/check-circle-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/check-circle-blue.imageset/check-circle-blue.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/check-circle.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "check-circle.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "check-circle-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "check-circle-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/check-circle.imageset/check-circle-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/check-circle.imageset/check-circle-1.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/check-circle.imageset/check-circle-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/check-circle.imageset/check-circle-2.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/check-circle.imageset/check-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/check-circle.imageset/check-circle.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/doh.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "doh.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "doh-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "doh-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/doh.imageset/doh-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/doh.imageset/doh-1.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/doh.imageset/doh-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/doh.imageset/doh-2.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/doh.imageset/doh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/doh.imageset/doh.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/happy.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "happy.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "happy-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "happy-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/happy.imageset/happy-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/happy.imageset/happy-1.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/happy.imageset/happy-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/happy.imageset/happy-2.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/happy.imageset/happy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/happy.imageset/happy.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/sad.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "sad.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "sad-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "sad-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/sad.imageset/sad-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/sad.imageset/sad-1.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/sad.imageset/sad-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/sad.imageset/sad-2.png -------------------------------------------------------------------------------- /EFIgy/Assets.xcassets/sad.imageset/sad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/EFIgy/Assets.xcassets/sad.imageset/sad.png -------------------------------------------------------------------------------- /EFIgy/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | Default 564 | 565 | 566 | 567 | 568 | 569 | 570 | Left to Right 571 | 572 | 573 | 574 | 575 | 576 | 577 | Right to Left 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | Default 589 | 590 | 591 | 592 | 593 | 594 | 595 | Left to Right 596 | 597 | 598 | 599 | 600 | 601 | 602 | Right to Left 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 860 | 864 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | -------------------------------------------------------------------------------- /EFIgy/EFIgy.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /EFIgy/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0.4 21 | CFBundleVersion 22 | 5 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2017 Duo Security. All rights reserved. 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | SUFeedURL 32 | https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/appcast/appcast.xml 33 | 34 | 35 | -------------------------------------------------------------------------------- /EFIgy/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // EFIgy 4 | // 5 | // Created by James Barclay on 10/5/17. 6 | // Copyright © 2017 Duo Security. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /EFIgyTests/EFIgyTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // EFIgyTests.m 3 | // EFIgyTests 4 | // 5 | // Created by James Barclay on 10/5/17. 6 | // Copyright © 2017 Duo Security. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface EFIgyTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation EFIgyTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /EFIgyTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /ExportOptions.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | method 6 | mac-application 7 | 8 | 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Duo Security, Inc. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 3. Neither the name of the copyright holder nor the names of its 13 | contributors may be used to endorse or promote products derived from 14 | this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 17 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 18 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 20 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: notarize 2 | 3 | # Mostly cribbed from https://gist.github.com/shpakovski/31067c499d69d1d4180856be3d67e5a5. 4 | 5 | # XCS_ARCHIVE is an environment variable typically set by Xcode Server. 6 | # We're not using Xcode server so I'm hardcoding it here. 7 | # 8 | # https://developer.apple.com/library/archive/documentation/IDEs/Conceptual/xcode_guide-continuous_integration/EnvironmentVariableReference.html 9 | XCS_ARCHIVE := "buildArchive/EFIgy.xcarchive" 10 | 11 | EXPORT_PATH := $(XCS_ARCHIVE)/Submissions 12 | BUNDLE_APP := $(EXPORT_PATH)/EFIgy.app 13 | BUNDLE_ZIP := $(EXPORT_PATH)/EFIgy.zip 14 | UPLOAD_INFO_PLIST := $(EXPORT_PATH)/UploadInfo.plist 15 | REQUEST_INFO_PLIST := $(EXPORT_PATH)/RequestInfo.plist 16 | AUDIT_INFO_JSON := $(EXPORT_PATH)/AuditInfo.json 17 | PRODUCT_DIR := $(XCS_ARCHIVE)/Products/Applications 18 | PRODUCT_APP := $(PRODUCT_DIR)/EFIgy.app 19 | PRIMARY_BUNDLE_ID := "com.duosecurity.EFIgy" 20 | CODE_SIGN_IDENTITY_NAME := "Developer ID Application: Duo Security, Inc. (FNN8Z5JMFP)" 21 | 22 | define notify 23 | @ /usr/bin/osascript -e 'display notification $2 with title $1' 24 | endef 25 | 26 | define wait_while_in_progress 27 | while true; do \ 28 | /usr/bin/xcrun altool --notarization-info `/usr/libexec/PlistBuddy -c "Print :notarization-upload:RequestUUID" $(UPLOAD_INFO_PLIST)` -u $(DEVELOPER_USERNAME) -p $(DEVELOPER_PASSWORD) --output-format xml > $(REQUEST_INFO_PLIST) ;\ 29 | if [ "`/usr/libexec/PlistBuddy -c "Print :notarization-info:Status" $(REQUEST_INFO_PLIST)`" != "in progress" ]; then \ 30 | break ;\ 31 | fi ;\ 32 | /usr/bin/osascript -e 'display notification "Zzz..." with title "Notarization"' ;\ 33 | sleep 60 ;\ 34 | done 35 | endef 36 | 37 | archive: 38 | $(call notify, "Archiving", "Creating archive...") 39 | xcodebuild -workspace EFIgy.xcworkspace -scheme EFIgy -configuration Release clean archive -archivePath "$XCS_ARCHIVE" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO 40 | 41 | export-archive: 42 | $(call notify, "Archiving", "Exporting an archive...") 43 | /usr/bin/xcrun xcodebuild -exportArchive -archivePath $(XCS_ARCHIVE) -exportPath $(EXPORT_PATH) -exportOptionsPlist ./ExportOptions.plist -IDEPostProgressNotifications=YES -DVTAllowServerCertificates=YES -DVTProvisioningUseServerAccounts=YES -configuration Release 44 | 45 | codesign: 46 | $(call notify, "Code Signing", "Code signing Sparkle AutoUpdate. Please enter PIN and touch the security key...") 47 | codesign --timestamp --verbose --force --deep -o runtime --sign $(CODE_SIGN_IDENTITY_NAME) $(BUNDLE_APP)/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/Autoupdate.app 48 | $(call notify, "Code Signing", "Code signing app. Please enter PIN and touch the security key...") 49 | codesign --timestamp --verbose --deep -o runtime -s $(CODE_SIGN_IDENTITY_NAME) -fv $(BUNDLE_APP) 50 | 51 | notarize: 52 | $(call notify, "Notarization", "Building a ZIP archive...") 53 | /usr/bin/ditto -c -k --rsrc --keepParent $(BUNDLE_APP) $(BUNDLE_ZIP) 54 | $(call notify, "Notarization", "Uploading for notarization...") 55 | /usr/bin/xcrun altool --notarize-app --primary-bundle-id $(PRIMARY_BUNDLE_ID) -u $(DEVELOPER_USERNAME) -p $(DEVELOPER_PASSWORD) -f $(BUNDLE_ZIP) --output-format xml > $(UPLOAD_INFO_PLIST) 56 | sleep 2 57 | $(call notify, "Notarization", "Waiting while notarized...") 58 | /usr/bin/xcrun altool --notarization-info `/usr/libexec/PlistBuddy -c "Print :notarization-upload:RequestUUID" $(UPLOAD_INFO_PLIST)` -u $(DEVELOPER_USERNAME) -p $(DEVELOPER_PASSWORD) --output-format xml > $(REQUEST_INFO_PLIST) 59 | $(call wait_while_in_progress) 60 | $(call notify, "Notarization", "Downloading log file...") 61 | /usr/bin/curl -o $(AUDIT_INFO_JSON) `/usr/libexec/PlistBuddy -c "Print :notarization-info:LogFileURL" $(REQUEST_INFO_PLIST)` 62 | if [ `/usr/libexec/PlistBuddy -c "Print :notarization-info:Status" $(REQUEST_INFO_PLIST)` != "success" ]; then \ 63 | false; \ 64 | fi 65 | $(call notify, "Notarization", "Stapling...") 66 | /usr/bin/xcrun stapler staple $(BUNDLE_APP) 67 | $(call notify, "Notarization", "Replacing original product...") 68 | rm -rf $(PRODUCT_APP) 69 | mv $(BUNDLE_APP) $(PRODUCT_DIR)/ 70 | $(call notify, "Notarization", "✅ Done!") 71 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.12' 2 | 3 | target 'EFIgy' do 4 | use_frameworks! 5 | pod 'LetsMove' 6 | pod 'Sparkle' 7 | end 8 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - LetsMove (1.24) 3 | - Sparkle (1.21.3) 4 | 5 | DEPENDENCIES: 6 | - LetsMove 7 | - Sparkle 8 | 9 | SPEC REPOS: 10 | https://github.com/cocoapods/specs.git: 11 | - LetsMove 12 | - Sparkle 13 | 14 | SPEC CHECKSUMS: 15 | LetsMove: fefe56bc7bc7fb7d37049e28a14f297961229fc5 16 | Sparkle: 3f75576db8b0265adef36c43249d747f22d0b708 17 | 18 | PODFILE CHECKSUM: 2a9995deee40fbd399df209dcfa18ef1319235c8 19 | 20 | COCOAPODS: 1.7.0.beta.3 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EFIgy-GUI 2 | 3 | EFIgy-GUI is a macOS app based on the [EFIgy][1] command-line tool. EFIgy-GUI can be used to determine if your Mac is running an expected EFI version. 4 | 5 | ![EFIgy-GUI](resources/images/efigy-gui.gif) 6 | 7 | [1]: https://efigy.io 8 | -------------------------------------------------------------------------------- /Release.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Common.xcconfig 3 | // EFIgy 4 | // 5 | // Created by James Barclay on 8/15/19. 6 | // Copyright © 2019 Duo Security. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | ENABLE_HARDENED_RUNTIME = YES 13 | OTHER_CODE_SIGN_FLAGS = --deep --timestamp 14 | -------------------------------------------------------------------------------- /resources/images/efigy-gui.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duo-labs/EFIgy-GUI/5cc1c863119ceb54dfd33c15b4681cabb42d9da0/resources/images/efigy-gui.gif --------------------------------------------------------------------------------