├── .DS_Store ├── README.md ├── TokenRabbit.app.zip ├── TokenRabbit.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ ├── localadmin.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── to26409.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── localadmin.xcuserdatad │ └── xcschemes │ │ └── xcschememanagement.plist │ └── to26409.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── TokenRabbit ├── AppDelegate.applescript ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── 1024.png │ │ ├── Contents.json │ │ ├── tr128.png │ │ ├── tr16.png │ │ ├── tr256-1.png │ │ ├── tr256.png │ │ ├── tr32-1.png │ │ ├── tr32.png │ │ ├── tr512-1.png │ │ ├── tr512.png │ │ └── tr64.png ├── Base.lproj │ └── MainMenu.xib ├── ChangeLog.rtf ├── Info.plist └── main.m └── tr256.png /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/.DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TokenRabbit 2 | GUI tool to Assign Secure Token to a user under 10.13 3 | 4 | This tool will allow you to enter the name of an administrator with SecureToken assigned, then grant SecureToken to another user. 5 | 6 | Benefits: 7 | Checks the administrator actually does have SecureToken set 8 | Checks the target user does not have SecureTokenSet 9 | If the target user is an AD account, createmobileaccount will be invoked to SecureToken can be assigned. 10 | 11 | 12 | Simply enter the Administrative name and password, then the target user's name and password. 13 | 14 | -------------------------------------------------------------------------------- /TokenRabbit.app.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit.app.zip -------------------------------------------------------------------------------- /TokenRabbit.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 7D345D2120483ED7002B8BAA /* AppleScriptObjC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D345D2020483ED7002B8BAA /* AppleScriptObjC.framework */; }; 11 | 7D345D2420483ED7002B8BAA /* AppDelegate.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 7D345D2320483ED7002B8BAA /* AppDelegate.applescript */; }; 12 | 7D345D2620483ED7002B8BAA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D345D2520483ED7002B8BAA /* Assets.xcassets */; }; 13 | 7D345D2920483ED7002B8BAA /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D345D2720483ED7002B8BAA /* MainMenu.xib */; }; 14 | 7D345D2C20483ED7002B8BAA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D345D2B20483ED7002B8BAA /* main.m */; }; 15 | 7D6F260E204898F400477F3A /* tr256.png in Resources */ = {isa = PBXBuildFile; fileRef = 7D6F260D204898F400477F3A /* tr256.png */; }; 16 | 7DA78737209233F300388E52 /* ChangeLog.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 7DA78736209233F300388E52 /* ChangeLog.rtf */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 7D1526BD215BB66500D76F56 /* CopyFiles */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | ); 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 7D345D1D20483ED7002B8BAA /* TokenRabbit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TokenRabbit.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 7D345D2020483ED7002B8BAA /* AppleScriptObjC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppleScriptObjC.framework; path = System/Library/Frameworks/AppleScriptObjC.framework; sourceTree = SDKROOT; }; 34 | 7D345D2320483ED7002B8BAA /* AppDelegate.applescript */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.applescript; path = AppDelegate.applescript; sourceTree = ""; }; 35 | 7D345D2520483ED7002B8BAA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 36 | 7D345D2820483ED7002B8BAA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 37 | 7D345D2A20483ED7002B8BAA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | 7D345D2B20483ED7002B8BAA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 39 | 7D6F260D204898F400477F3A /* tr256.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tr256.png; sourceTree = SOURCE_ROOT; }; 40 | 7DA78736209233F300388E52 /* ChangeLog.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = ChangeLog.rtf; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | 7D345D1A20483ED7002B8BAA /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | 7D345D2120483ED7002B8BAA /* AppleScriptObjC.framework in Frameworks */, 49 | ); 50 | runOnlyForDeploymentPostprocessing = 0; 51 | }; 52 | /* End PBXFrameworksBuildPhase section */ 53 | 54 | /* Begin PBXGroup section */ 55 | 7D345D1420483ED7002B8BAA = { 56 | isa = PBXGroup; 57 | children = ( 58 | 7D345D2220483ED7002B8BAA /* TokenRabbit */, 59 | 7D345D1F20483ED7002B8BAA /* Frameworks */, 60 | 7D345D1E20483ED7002B8BAA /* Products */, 61 | ); 62 | sourceTree = ""; 63 | }; 64 | 7D345D1E20483ED7002B8BAA /* Products */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 7D345D1D20483ED7002B8BAA /* TokenRabbit.app */, 68 | ); 69 | name = Products; 70 | sourceTree = ""; 71 | }; 72 | 7D345D1F20483ED7002B8BAA /* Frameworks */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 7D345D2020483ED7002B8BAA /* AppleScriptObjC.framework */, 76 | ); 77 | name = Frameworks; 78 | sourceTree = ""; 79 | }; 80 | 7D345D2220483ED7002B8BAA /* TokenRabbit */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 7D345D2320483ED7002B8BAA /* AppDelegate.applescript */, 84 | 7D345D2520483ED7002B8BAA /* Assets.xcassets */, 85 | 7D345D2720483ED7002B8BAA /* MainMenu.xib */, 86 | 7D345D2A20483ED7002B8BAA /* Info.plist */, 87 | 7D345D2B20483ED7002B8BAA /* main.m */, 88 | 7D6F260D204898F400477F3A /* tr256.png */, 89 | 7DA78736209233F300388E52 /* ChangeLog.rtf */, 90 | ); 91 | path = TokenRabbit; 92 | sourceTree = ""; 93 | }; 94 | /* End PBXGroup section */ 95 | 96 | /* Begin PBXNativeTarget section */ 97 | 7D345D1C20483ED7002B8BAA /* TokenRabbit */ = { 98 | isa = PBXNativeTarget; 99 | buildConfigurationList = 7D345D2F20483ED7002B8BAA /* Build configuration list for PBXNativeTarget "TokenRabbit" */; 100 | buildPhases = ( 101 | 7D345D1920483ED7002B8BAA /* Sources */, 102 | 7D345D1A20483ED7002B8BAA /* Frameworks */, 103 | 7D345D1B20483ED7002B8BAA /* Resources */, 104 | 7D1526BD215BB66500D76F56 /* CopyFiles */, 105 | ); 106 | buildRules = ( 107 | ); 108 | dependencies = ( 109 | ); 110 | name = TokenRabbit; 111 | productName = TokenRabbit; 112 | productReference = 7D345D1D20483ED7002B8BAA /* TokenRabbit.app */; 113 | productType = "com.apple.product-type.application"; 114 | }; 115 | /* End PBXNativeTarget section */ 116 | 117 | /* Begin PBXProject section */ 118 | 7D345D1520483ED7002B8BAA /* Project object */ = { 119 | isa = PBXProject; 120 | attributes = { 121 | LastUpgradeCheck = 0920; 122 | ORGANIZATIONNAME = "MIT Lincoln Labs"; 123 | TargetAttributes = { 124 | 7D345D1C20483ED7002B8BAA = { 125 | CreatedOnToolsVersion = 9.2; 126 | ProvisioningStyle = Automatic; 127 | }; 128 | }; 129 | }; 130 | buildConfigurationList = 7D345D1820483ED7002B8BAA /* Build configuration list for PBXProject "TokenRabbit" */; 131 | compatibilityVersion = "Xcode 8.0"; 132 | developmentRegion = en; 133 | hasScannedForEncodings = 0; 134 | knownRegions = ( 135 | en, 136 | Base, 137 | ); 138 | mainGroup = 7D345D1420483ED7002B8BAA; 139 | productRefGroup = 7D345D1E20483ED7002B8BAA /* Products */; 140 | projectDirPath = ""; 141 | projectRoot = ""; 142 | targets = ( 143 | 7D345D1C20483ED7002B8BAA /* TokenRabbit */, 144 | ); 145 | }; 146 | /* End PBXProject section */ 147 | 148 | /* Begin PBXResourcesBuildPhase section */ 149 | 7D345D1B20483ED7002B8BAA /* Resources */ = { 150 | isa = PBXResourcesBuildPhase; 151 | buildActionMask = 2147483647; 152 | files = ( 153 | 7D345D2620483ED7002B8BAA /* Assets.xcassets in Resources */, 154 | 7D345D2920483ED7002B8BAA /* MainMenu.xib in Resources */, 155 | 7D6F260E204898F400477F3A /* tr256.png in Resources */, 156 | 7DA78737209233F300388E52 /* ChangeLog.rtf in Resources */, 157 | ); 158 | runOnlyForDeploymentPostprocessing = 0; 159 | }; 160 | /* End PBXResourcesBuildPhase section */ 161 | 162 | /* Begin PBXSourcesBuildPhase section */ 163 | 7D345D1920483ED7002B8BAA /* Sources */ = { 164 | isa = PBXSourcesBuildPhase; 165 | buildActionMask = 2147483647; 166 | files = ( 167 | 7D345D2C20483ED7002B8BAA /* main.m in Sources */, 168 | 7D345D2420483ED7002B8BAA /* AppDelegate.applescript in Sources */, 169 | ); 170 | runOnlyForDeploymentPostprocessing = 0; 171 | }; 172 | /* End PBXSourcesBuildPhase section */ 173 | 174 | /* Begin PBXVariantGroup section */ 175 | 7D345D2720483ED7002B8BAA /* MainMenu.xib */ = { 176 | isa = PBXVariantGroup; 177 | children = ( 178 | 7D345D2820483ED7002B8BAA /* Base */, 179 | ); 180 | name = MainMenu.xib; 181 | sourceTree = ""; 182 | }; 183 | /* End PBXVariantGroup section */ 184 | 185 | /* Begin XCBuildConfiguration section */ 186 | 7D345D2D20483ED7002B8BAA /* Debug */ = { 187 | isa = XCBuildConfiguration; 188 | buildSettings = { 189 | ALWAYS_SEARCH_USER_PATHS = NO; 190 | CLANG_ANALYZER_NONNULL = YES; 191 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 192 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 193 | CLANG_CXX_LIBRARY = "libc++"; 194 | CLANG_ENABLE_MODULES = YES; 195 | CLANG_ENABLE_OBJC_ARC = YES; 196 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 197 | CLANG_WARN_BOOL_CONVERSION = YES; 198 | CLANG_WARN_COMMA = YES; 199 | CLANG_WARN_CONSTANT_CONVERSION = YES; 200 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 201 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 202 | CLANG_WARN_EMPTY_BODY = YES; 203 | CLANG_WARN_ENUM_CONVERSION = YES; 204 | CLANG_WARN_INFINITE_RECURSION = YES; 205 | CLANG_WARN_INT_CONVERSION = YES; 206 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 207 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 208 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 209 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 210 | CLANG_WARN_STRICT_PROTOTYPES = YES; 211 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 212 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 213 | CLANG_WARN_UNREACHABLE_CODE = YES; 214 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 215 | CODE_SIGN_IDENTITY = "Mac Developer"; 216 | COPY_PHASE_STRIP = NO; 217 | DEBUG_INFORMATION_FORMAT = dwarf; 218 | ENABLE_STRICT_OBJC_MSGSEND = YES; 219 | ENABLE_TESTABILITY = YES; 220 | GCC_C_LANGUAGE_STANDARD = gnu11; 221 | GCC_DYNAMIC_NO_PIC = NO; 222 | GCC_NO_COMMON_BLOCKS = YES; 223 | GCC_OPTIMIZATION_LEVEL = 0; 224 | GCC_PREPROCESSOR_DEFINITIONS = ( 225 | "DEBUG=1", 226 | "$(inherited)", 227 | ); 228 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 229 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 230 | GCC_WARN_UNDECLARED_SELECTOR = YES; 231 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 232 | GCC_WARN_UNUSED_FUNCTION = YES; 233 | GCC_WARN_UNUSED_VARIABLE = YES; 234 | MACOSX_DEPLOYMENT_TARGET = 10.12; 235 | MTL_ENABLE_DEBUG_INFO = YES; 236 | ONLY_ACTIVE_ARCH = YES; 237 | SDKROOT = macosx; 238 | }; 239 | name = Debug; 240 | }; 241 | 7D345D2E20483ED7002B8BAA /* Release */ = { 242 | isa = XCBuildConfiguration; 243 | buildSettings = { 244 | ALWAYS_SEARCH_USER_PATHS = NO; 245 | CLANG_ANALYZER_NONNULL = YES; 246 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 247 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 248 | CLANG_CXX_LIBRARY = "libc++"; 249 | CLANG_ENABLE_MODULES = YES; 250 | CLANG_ENABLE_OBJC_ARC = YES; 251 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 252 | CLANG_WARN_BOOL_CONVERSION = YES; 253 | CLANG_WARN_COMMA = YES; 254 | CLANG_WARN_CONSTANT_CONVERSION = YES; 255 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 256 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 257 | CLANG_WARN_EMPTY_BODY = YES; 258 | CLANG_WARN_ENUM_CONVERSION = YES; 259 | CLANG_WARN_INFINITE_RECURSION = YES; 260 | CLANG_WARN_INT_CONVERSION = YES; 261 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 262 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 263 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 264 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 265 | CLANG_WARN_STRICT_PROTOTYPES = YES; 266 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 267 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 268 | CLANG_WARN_UNREACHABLE_CODE = YES; 269 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 270 | CODE_SIGN_IDENTITY = "Mac Developer"; 271 | COPY_PHASE_STRIP = NO; 272 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 273 | ENABLE_NS_ASSERTIONS = NO; 274 | ENABLE_STRICT_OBJC_MSGSEND = YES; 275 | GCC_C_LANGUAGE_STANDARD = gnu11; 276 | GCC_NO_COMMON_BLOCKS = YES; 277 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 278 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 279 | GCC_WARN_UNDECLARED_SELECTOR = YES; 280 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 281 | GCC_WARN_UNUSED_FUNCTION = YES; 282 | GCC_WARN_UNUSED_VARIABLE = YES; 283 | MACOSX_DEPLOYMENT_TARGET = 10.12; 284 | MTL_ENABLE_DEBUG_INFO = NO; 285 | SDKROOT = macosx; 286 | }; 287 | name = Release; 288 | }; 289 | 7D345D3020483ED7002B8BAA /* Debug */ = { 290 | isa = XCBuildConfiguration; 291 | buildSettings = { 292 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 293 | CODE_SIGN_STYLE = Automatic; 294 | COMBINE_HIDPI_IMAGES = YES; 295 | DEVELOPMENT_TEAM = G95YF369FG; 296 | FRAMEWORK_SEARCH_PATHS = ( 297 | "$(inherited)", 298 | "$(PROJECT_DIR)", 299 | ); 300 | INFOPLIST_FILE = TokenRabbit/Info.plist; 301 | LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks $(inherited)"; 302 | MACOSX_DEPLOYMENT_TARGET = 10.13; 303 | PRODUCT_BUNDLE_IDENTIFIER = edu.mit.ll.TokenRabbit; 304 | PRODUCT_NAME = "$(TARGET_NAME)"; 305 | }; 306 | name = Debug; 307 | }; 308 | 7D345D3120483ED7002B8BAA /* Release */ = { 309 | isa = XCBuildConfiguration; 310 | buildSettings = { 311 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 312 | CODE_SIGN_STYLE = Automatic; 313 | COMBINE_HIDPI_IMAGES = YES; 314 | DEVELOPMENT_TEAM = G95YF369FG; 315 | FRAMEWORK_SEARCH_PATHS = ( 316 | "$(inherited)", 317 | "$(PROJECT_DIR)", 318 | ); 319 | INFOPLIST_FILE = TokenRabbit/Info.plist; 320 | LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks $(inherited)"; 321 | MACOSX_DEPLOYMENT_TARGET = 10.13; 322 | PRODUCT_BUNDLE_IDENTIFIER = edu.mit.ll.TokenRabbit; 323 | PRODUCT_NAME = "$(TARGET_NAME)"; 324 | }; 325 | name = Release; 326 | }; 327 | /* End XCBuildConfiguration section */ 328 | 329 | /* Begin XCConfigurationList section */ 330 | 7D345D1820483ED7002B8BAA /* Build configuration list for PBXProject "TokenRabbit" */ = { 331 | isa = XCConfigurationList; 332 | buildConfigurations = ( 333 | 7D345D2D20483ED7002B8BAA /* Debug */, 334 | 7D345D2E20483ED7002B8BAA /* Release */, 335 | ); 336 | defaultConfigurationIsVisible = 0; 337 | defaultConfigurationName = Release; 338 | }; 339 | 7D345D2F20483ED7002B8BAA /* Build configuration list for PBXNativeTarget "TokenRabbit" */ = { 340 | isa = XCConfigurationList; 341 | buildConfigurations = ( 342 | 7D345D3020483ED7002B8BAA /* Debug */, 343 | 7D345D3120483ED7002B8BAA /* Release */, 344 | ); 345 | defaultConfigurationIsVisible = 0; 346 | defaultConfigurationName = Release; 347 | }; 348 | /* End XCConfigurationList section */ 349 | }; 350 | rootObject = 7D345D1520483ED7002B8BAA /* Project object */; 351 | } 352 | -------------------------------------------------------------------------------- /TokenRabbit.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TokenRabbit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TokenRabbit.xcodeproj/project.xcworkspace/xcuserdata/localadmin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit.xcodeproj/project.xcworkspace/xcuserdata/localadmin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TokenRabbit.xcodeproj/project.xcworkspace/xcuserdata/to26409.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit.xcodeproj/project.xcworkspace/xcuserdata/to26409.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TokenRabbit.xcodeproj/xcuserdata/localadmin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | TokenRabbit.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /TokenRabbit.xcodeproj/xcuserdata/to26409.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | TokenRabbit.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /TokenRabbit/AppDelegate.applescript: -------------------------------------------------------------------------------- 1 | -- 2 | -- AppDelegate.applescript 3 | -- TokenRabbit 4 | -- 5 | -- Created by Houle, Todd on 3/1/18. 6 | -- 7 | 8 | script AppDelegate 9 | property parent : class "NSObject" 10 | property adminUser : "" 11 | property adminPW : "" 12 | property targetUser : "" 13 | property targetPW : "" 14 | property enabledAdmins : true 15 | property adminStatusUser : "" 16 | property adminStatusPW : "" 17 | property userPWStatus : "" 18 | property userStatus : "" 19 | property userEnabled : true 20 | property adminSTText : "" 21 | property userSTText : "" 22 | property mySTusers : {"Generating..."} 23 | 24 | -- IBOutlets 25 | property theWindow : missing value 26 | 27 | 28 | --NOTES 29 | -- bash-3.2# diskutil apfs listCryptoUsers / 30 | -- No cryptographic users for disk1s1 31 | 32 | 33 | on applicationWillFinishLaunching_(aNotification) 34 | -- Create list of users with SecureToken 35 | set users to (do shell script "dscl . read /Groups/admin GroupMembership") 36 | set AppleScript's text item delimiters to " " 37 | set userList1 to every text item of users as list 38 | set userList to items 2 thru -1 of userList1 39 | set mySTusers to {} 40 | repeat with oneUser in userList 41 | set hasToken to "" 42 | try 43 | set hasToken to (do shell script "sysadminctl -secureTokenStatus " & oneUser & " 2>&1|grep ENABLED;exit 0") 44 | end try 45 | if hasToken is "" then 46 | --display dialog oneUser & " does NOT have a token" 47 | else 48 | --display dialog oneUser & " does have Token!" 49 | set my mySTusers to mySTusers & oneUser 50 | end if 51 | end repeat 52 | try 53 | set my adminUser to item 1 of mySTusers 54 | on error 55 | display dialog "No SecureToken users found. (Was this machine upgraded from 10.12? Token status is hidden on those machines) Either any user can enable filevault or no user can. Please enable filevault and then come back to this app." buttons "Quit" default button 1 with icon 2 56 | tell me to quit 57 | --set my mySTUsers to userList 58 | end try 59 | 60 | end applicationWillFinishLaunching_ 61 | 62 | on applicationShouldTerminate_(sender) 63 | -- Insert code here to do any housekeeping before your application quits 64 | return current application's NSTerminateNow 65 | end applicationShouldTerminate_ 66 | 67 | on quitTime_(sender) 68 | tell me to quit 69 | end quitTime_ 70 | 71 | on testNamePW_(sender) 72 | try 73 | do shell script "touch /tmp/test$$" user name (adminUser as string) password (adminPW as string) with administrator privileges 74 | on error 75 | set my adminStatusUser to "❌" 76 | set my adminStatusPW to "❌" 77 | end try 78 | 79 | 80 | set my enabledAdmins to false 81 | set my adminStatusUser to "✔️" 82 | set my adminStatusPW to "✔️" 83 | set my adminSTText to "" 84 | 85 | end testNamePW_ 86 | 87 | on selectSTuserFromPopup_(sender) 88 | -- display dialog sender's titleOfSelectedItem() as text 89 | set my adminUser to sender's titleOfSelectedItem() as text 90 | end selectSTuserFromPopup_ 91 | 92 | on checkDoesUserHaveST_(sender) 93 | --does user exist 94 | try 95 | set userList to do shell script "dscl . -list /Users | grep -i " & targetUser 96 | on error 97 | do shell script "/System/Library/CoreServices/ManagedClient.app/Contents/Resources/createmobileaccount -n " & targetUser user name (targetUser as string) password (targetPW as string) with administrator privileges 98 | end try 99 | 100 | set my userStatus to "✔️" 101 | set my userSTText to "" 102 | 103 | end checkDoesUserHaveST_ 104 | 105 | on checkUserNamePW_(sender) 106 | 107 | try 108 | do shell script ("dscl /Local/Default authonly " & targetUser as string & " \"" & targetPW & "\"") 109 | set my userPWStatus to "✔️" 110 | set my userStatus to "✔️" 111 | set my userEnabled to false 112 | on error 113 | display dialog "The password for " & targetUser & " appears incorrect." buttons "OK" default button 1 114 | set my userPWStatus to "❌" 115 | set my userStatus to "❌" 116 | end try 117 | checkDoesUserHaveST_(1) 118 | end checkUserNamePW_ 119 | 120 | 121 | on assignToken_(sender) 122 | theWindow's makeFirstResponder_(theWindow) 123 | 124 | if enabledAdmins is not false 125 | display dialog "ERROR: Verify Admin name and password before assigning token." buttons "OK" default button 1 126 | return 127 | end if 128 | 129 | if userEnabled is not false 130 | display dialog "ERROR: Verify Target User's name and password before assigning token." buttons "OK" default button 1 131 | return 132 | end if 133 | 134 | try 135 | do shell script "sysadminctl -adminUser " & adminUser & " -adminPassword \"" & adminPW & "\" -secureTokenOff " & targetUser & " -password \"" & targetPW & "\" 2>&1 " & adminUser user name (adminUser as string) password (adminPW as string) with administrator privileges 136 | end try 137 | try 138 | set doSTStatus to do shell script "sysadminctl -adminUser " & adminUser & " -adminPassword \"" & adminPW & "\" -secureTokenOn " & targetUser & " -password \"" & targetPW & "\" 2>&1 " & adminUser user name (adminUser as string) password (adminPW as string) with administrator privileges 139 | set my userSTText to "SecureToken Enabled" 140 | try 141 | do shell script "diskutil apfs updatePreboot /" user name (adminUser as string) password (adminPW as string) with administrator privileges 142 | end try 143 | 144 | display dialog "Secure Token Assigned!" buttons "Quit" default button 1 145 | tell me to quit 146 | on error 147 | display dialog "Error occured assigning SecureToken. Status unknown." buttons "Aww, Snap!" default button 1 148 | end try 149 | end assignToken_ 150 | 151 | end script 152 | -------------------------------------------------------------------------------- /TokenRabbit/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /TokenRabbit/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "tr16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "tr32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "tr32-1.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "tr64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "tr128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "tr256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "tr256-1.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "tr512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "tr512-1.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr128.png -------------------------------------------------------------------------------- /TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr16.png -------------------------------------------------------------------------------- /TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr256-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr256-1.png -------------------------------------------------------------------------------- /TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr256.png -------------------------------------------------------------------------------- /TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr32-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr32-1.png -------------------------------------------------------------------------------- /TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr32.png -------------------------------------------------------------------------------- /TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr512-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr512-1.png -------------------------------------------------------------------------------- /TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr512.png -------------------------------------------------------------------------------- /TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/TokenRabbit/Assets.xcassets/AppIcon.appiconset/tr64.png -------------------------------------------------------------------------------- /TokenRabbit/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 | NSAllRomanInputSourcesLocaleIdentifier 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | NSAllRomanInputSourcesLocaleIdentifier 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 | 298 | 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 | -------------------------------------------------------------------------------- /TokenRabbit/ChangeLog.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | {\*\expandedcolortbl;;} 5 | \margl1440\margr1440\vieww9000\viewh8400\viewkind0 6 | \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 7 | 8 | \f0\fs24 \cf0 2.1.2\ 9 | 14May2018\ 10 | Remove Quoted form of. Add \\" to passwords. \ 11 | Add Popup for Admin user, checking they have secure token\ 12 | \ 13 | 2.1.1\ 14 | 10May2018\ 15 | use Quoted Form Of password for target user\ 16 | \ 17 | Version 2.1\ 18 | 26Apr2018\ 19 | Nothing new - just testing updates.\ 20 | \ 21 | Version 2.0\ 22 | 26Apr2018\ 23 | Added Sparkle Update} -------------------------------------------------------------------------------- /TokenRabbit/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 | 2.1.3 21 | CFBundleVersion 22 | 20 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2018 All rights reserved. 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | SUEnableAutomaticChecks 32 | 33 | SUScheduledCheckInterval 34 | 5000 35 | 36 | 37 | -------------------------------------------------------------------------------- /TokenRabbit/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TokenRabbit 4 | // 5 | // Created by Houle, Todd - 1130 - MITLL on 3/1/18. 6 | // Copyright © 2018 MIT Lincoln Labs. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | int main(int argc, const char * argv[]) { 13 | [[NSBundle mainBundle] loadAppleScriptObjectiveCScripts]; 14 | return NSApplicationMain(argc, argv); 15 | } 16 | -------------------------------------------------------------------------------- /tr256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmhoule/TokenRabbit/f2c3d446957c632d6e509f942d4e7be5918c1fe7/tr256.png --------------------------------------------------------------------------------