├── .gitignore ├── Captcha.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── peter.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── peter.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Captcha.xcworkspace └── contents.xcworkspacedata ├── Captcha ├── Account.swift ├── AcknowledgmentsTableViewController.swift ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── cog-icon.imageset │ │ ├── Contents.json │ │ ├── icons8_Settings_96.png │ │ ├── icons8_Settings_96@2x.png │ │ └── icons8_Settings_96@3x.png │ ├── icon-home.imageset │ │ ├── Contents.json │ │ ├── Home-48.png │ │ └── Home-49.png │ └── solve-icon.imageset │ │ ├── Contents.json │ │ ├── solve-icon-1x.png │ │ ├── solve-icon-2x.png │ │ └── solve-icon.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Client.swift ├── ConfigTableViewController.swift ├── HistoryTableViewController.swift ├── Info.plist ├── Log.swift ├── Request.swift ├── Routes.swift ├── ServerResponse.swift ├── SettingsTableViewController.swift └── SolveViewController.swift ├── LICENSE ├── Podfile ├── Podfile.lock └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, 4 | # Objective-C.gitignore & Swift.gitignore 5 | 6 | ## Build generated 7 | build/ 8 | DerivedData/ 9 | 10 | .DS_Store 11 | 12 | 13 | ## Various settings 14 | *.pbxuser 15 | !default.pbxuser 16 | *.mode1v3 17 | !default.mode1v3 18 | *.mode2v3 19 | !default.mode2v3 20 | *.perspectivev3 21 | !default.perspectivev3 22 | xcuserdata/ 23 | 24 | ## Other 25 | *.moved-aside 26 | *.xccheckout 27 | *.xcscmblueprint 28 | 29 | ## Obj-C/Swift specific 30 | *.hmap 31 | *.ipa 32 | *.dSYM.zip 33 | *.dSYM 34 | 35 | # CocoaPods 36 | # 37 | # We recommend against adding the Pods directory to your .gitignore. However 38 | # you should judge for yourself, the pros and cons are mentioned at: 39 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 40 | # 41 | # Pods/ 42 | 43 | # Carthage 44 | # 45 | # Add this line if you want to avoid checking in source code from Carthage 46 | # dependencies. 47 | # Carthage/Checkouts 48 | 49 | Carthage/Build 50 | 51 | # fastlane 52 | # 53 | # It is recommended to not store the screenshots in the git repo. Instead, use 54 | # fastlane to re-generate the 55 | # screenshots whenever they are needed. 56 | # For more information about the recommended setup visit: 57 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 58 | 59 | fastlane/report.xml 60 | fastlane/Preview.html 61 | fastlane/screenshots 62 | fastlane/test_output 63 | 64 | # Code Injection 65 | # 66 | # After new code Injection tools there's a generated folder /iOSInjectionProject 67 | # https://github.com/johnno1962/injectionforxcode 68 | Pods 69 | iOSInjectionProject/ 70 | -------------------------------------------------------------------------------- /Captcha.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A2A0EA06CE590184CFEF7B75 /* Pods_Captcha.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8588DE5E6AC9AD1D908183E /* Pods_Captcha.framework */; }; 11 | D00DEF451FC103D900CDC5B1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D00DEF431FC103D900CDC5B1 /* Main.storyboard */; }; 12 | D00DEF471FC103D900CDC5B1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D00DEF461FC103D900CDC5B1 /* Assets.xcassets */; }; 13 | D00DEF4A1FC103D900CDC5B1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D00DEF481FC103D900CDC5B1 /* LaunchScreen.storyboard */; }; 14 | D012A6F41FC8633F0094EBFD /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = D012A6F31FC8633F0094EBFD /* Log.swift */; }; 15 | D0838B3A1FC1085000BBFB27 /* ServerResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0838B2F1FC1084E00BBFB27 /* ServerResponse.swift */; }; 16 | D0838B3B1FC1085000BBFB27 /* ConfigTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0838B301FC1084E00BBFB27 /* ConfigTableViewController.swift */; }; 17 | D0838B3C1FC1085000BBFB27 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0838B311FC1084F00BBFB27 /* AppDelegate.swift */; }; 18 | D0838B3D1FC1085000BBFB27 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0838B321FC1084F00BBFB27 /* Request.swift */; }; 19 | D0838B3E1FC1085000BBFB27 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0838B331FC1084F00BBFB27 /* Client.swift */; }; 20 | D0838B3F1FC1085000BBFB27 /* Account.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0838B341FC1084F00BBFB27 /* Account.swift */; }; 21 | D0838B401FC1085000BBFB27 /* SettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0838B351FC1084F00BBFB27 /* SettingsTableViewController.swift */; }; 22 | D0838B411FC1085000BBFB27 /* SolveViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0838B361FC1084F00BBFB27 /* SolveViewController.swift */; }; 23 | D0838B421FC1085000BBFB27 /* Routes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0838B381FC1085000BBFB27 /* Routes.swift */; }; 24 | D0838B431FC1085000BBFB27 /* HistoryTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0838B391FC1085000BBFB27 /* HistoryTableViewController.swift */; }; 25 | D0838B451FC10D1100BBFB27 /* AcknowledgmentsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0838B441FC10D1100BBFB27 /* AcknowledgmentsTableViewController.swift */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 6CD978C0F40E8978E2810314 /* Pods-Captcha.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Captcha.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Captcha/Pods-Captcha.debug.xcconfig"; sourceTree = ""; }; 30 | A8588DE5E6AC9AD1D908183E /* Pods_Captcha.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Captcha.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | D00DEF3C1FC103D900CDC5B1 /* Captcha.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Captcha.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | D00DEF441FC103D900CDC5B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 33 | D00DEF461FC103D900CDC5B1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 34 | D00DEF491FC103D900CDC5B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 35 | D00DEF4B1FC103D900CDC5B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 36 | D012A6F31FC8633F0094EBFD /* Log.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = ""; }; 37 | D0838B2F1FC1084E00BBFB27 /* ServerResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerResponse.swift; sourceTree = ""; }; 38 | D0838B301FC1084E00BBFB27 /* ConfigTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigTableViewController.swift; sourceTree = ""; }; 39 | D0838B311FC1084F00BBFB27 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | D0838B321FC1084F00BBFB27 /* Request.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Request.swift; sourceTree = ""; }; 41 | D0838B331FC1084F00BBFB27 /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; 42 | D0838B341FC1084F00BBFB27 /* Account.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Account.swift; sourceTree = ""; }; 43 | D0838B351FC1084F00BBFB27 /* SettingsTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsTableViewController.swift; sourceTree = ""; }; 44 | D0838B361FC1084F00BBFB27 /* SolveViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SolveViewController.swift; sourceTree = ""; }; 45 | D0838B381FC1085000BBFB27 /* Routes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Routes.swift; sourceTree = ""; }; 46 | D0838B391FC1085000BBFB27 /* HistoryTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryTableViewController.swift; sourceTree = ""; }; 47 | D0838B441FC10D1100BBFB27 /* AcknowledgmentsTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AcknowledgmentsTableViewController.swift; sourceTree = ""; }; 48 | EEF11C4E141B38FC072DFAAC /* Pods-Captcha.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Captcha.release.xcconfig"; path = "Pods/Target Support Files/Pods-Captcha/Pods-Captcha.release.xcconfig"; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | D00DEF391FC103D900CDC5B1 /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | A2A0EA06CE590184CFEF7B75 /* Pods_Captcha.framework in Frameworks */, 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | /* End PBXFrameworksBuildPhase section */ 61 | 62 | /* Begin PBXGroup section */ 63 | 8754030F3C419090FCFD6D25 /* Frameworks */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | A8588DE5E6AC9AD1D908183E /* Pods_Captcha.framework */, 67 | ); 68 | name = Frameworks; 69 | sourceTree = ""; 70 | }; 71 | D00DEF331FC103D900CDC5B1 = { 72 | isa = PBXGroup; 73 | children = ( 74 | D00DEF3E1FC103D900CDC5B1 /* Captcha */, 75 | D00DEF3D1FC103D900CDC5B1 /* Products */, 76 | EA4EF3DF87A8E4DC2ACF8992 /* Pods */, 77 | 8754030F3C419090FCFD6D25 /* Frameworks */, 78 | ); 79 | sourceTree = ""; 80 | }; 81 | D00DEF3D1FC103D900CDC5B1 /* Products */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | D00DEF3C1FC103D900CDC5B1 /* Captcha.app */, 85 | ); 86 | name = Products; 87 | sourceTree = ""; 88 | }; 89 | D00DEF3E1FC103D900CDC5B1 /* Captcha */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | D0838B311FC1084F00BBFB27 /* AppDelegate.swift */, 93 | D0838B341FC1084F00BBFB27 /* Account.swift */, 94 | D0838B321FC1084F00BBFB27 /* Request.swift */, 95 | D0838B2F1FC1084E00BBFB27 /* ServerResponse.swift */, 96 | D012A6F31FC8633F0094EBFD /* Log.swift */, 97 | D0838B331FC1084F00BBFB27 /* Client.swift */, 98 | D0838B301FC1084E00BBFB27 /* ConfigTableViewController.swift */, 99 | D0838B391FC1085000BBFB27 /* HistoryTableViewController.swift */, 100 | D0838B351FC1084F00BBFB27 /* SettingsTableViewController.swift */, 101 | D0838B441FC10D1100BBFB27 /* AcknowledgmentsTableViewController.swift */, 102 | D0838B381FC1085000BBFB27 /* Routes.swift */, 103 | D0838B361FC1084F00BBFB27 /* SolveViewController.swift */, 104 | D00DEF431FC103D900CDC5B1 /* Main.storyboard */, 105 | D00DEF481FC103D900CDC5B1 /* LaunchScreen.storyboard */, 106 | D00DEF461FC103D900CDC5B1 /* Assets.xcassets */, 107 | D00DEF4B1FC103D900CDC5B1 /* Info.plist */, 108 | ); 109 | path = Captcha; 110 | sourceTree = ""; 111 | }; 112 | EA4EF3DF87A8E4DC2ACF8992 /* Pods */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 6CD978C0F40E8978E2810314 /* Pods-Captcha.debug.xcconfig */, 116 | EEF11C4E141B38FC072DFAAC /* Pods-Captcha.release.xcconfig */, 117 | ); 118 | name = Pods; 119 | sourceTree = ""; 120 | }; 121 | /* End PBXGroup section */ 122 | 123 | /* Begin PBXNativeTarget section */ 124 | D00DEF3B1FC103D900CDC5B1 /* Captcha */ = { 125 | isa = PBXNativeTarget; 126 | buildConfigurationList = D00DEF4E1FC103D900CDC5B1 /* Build configuration list for PBXNativeTarget "Captcha" */; 127 | buildPhases = ( 128 | C7BFED27111FF67C09454F04 /* [CP] Check Pods Manifest.lock */, 129 | D00DEF381FC103D900CDC5B1 /* Sources */, 130 | D00DEF391FC103D900CDC5B1 /* Frameworks */, 131 | D00DEF3A1FC103D900CDC5B1 /* Resources */, 132 | 69C82AA6C93F04823838CC65 /* [CP] Embed Pods Frameworks */, 133 | CFC8ACA666113FA61FE841C8 /* [CP] Copy Pods Resources */, 134 | ); 135 | buildRules = ( 136 | ); 137 | dependencies = ( 138 | ); 139 | name = Captcha; 140 | productName = Captcha; 141 | productReference = D00DEF3C1FC103D900CDC5B1 /* Captcha.app */; 142 | productType = "com.apple.product-type.application"; 143 | }; 144 | /* End PBXNativeTarget section */ 145 | 146 | /* Begin PBXProject section */ 147 | D00DEF341FC103D900CDC5B1 /* Project object */ = { 148 | isa = PBXProject; 149 | attributes = { 150 | LastSwiftUpdateCheck = 0900; 151 | LastUpgradeCheck = 0900; 152 | ORGANIZATIONNAME = "Peter Soboyejo"; 153 | TargetAttributes = { 154 | D00DEF3B1FC103D900CDC5B1 = { 155 | CreatedOnToolsVersion = 9.0; 156 | LastSwiftMigration = 0900; 157 | ProvisioningStyle = Automatic; 158 | }; 159 | }; 160 | }; 161 | buildConfigurationList = D00DEF371FC103D900CDC5B1 /* Build configuration list for PBXProject "Captcha" */; 162 | compatibilityVersion = "Xcode 8.0"; 163 | developmentRegion = en; 164 | hasScannedForEncodings = 0; 165 | knownRegions = ( 166 | en, 167 | Base, 168 | ); 169 | mainGroup = D00DEF331FC103D900CDC5B1; 170 | productRefGroup = D00DEF3D1FC103D900CDC5B1 /* Products */; 171 | projectDirPath = ""; 172 | projectRoot = ""; 173 | targets = ( 174 | D00DEF3B1FC103D900CDC5B1 /* Captcha */, 175 | ); 176 | }; 177 | /* End PBXProject section */ 178 | 179 | /* Begin PBXResourcesBuildPhase section */ 180 | D00DEF3A1FC103D900CDC5B1 /* Resources */ = { 181 | isa = PBXResourcesBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | D00DEF4A1FC103D900CDC5B1 /* LaunchScreen.storyboard in Resources */, 185 | D00DEF471FC103D900CDC5B1 /* Assets.xcassets in Resources */, 186 | D00DEF451FC103D900CDC5B1 /* Main.storyboard in Resources */, 187 | ); 188 | runOnlyForDeploymentPostprocessing = 0; 189 | }; 190 | /* End PBXResourcesBuildPhase section */ 191 | 192 | /* Begin PBXShellScriptBuildPhase section */ 193 | 69C82AA6C93F04823838CC65 /* [CP] Embed Pods Frameworks */ = { 194 | isa = PBXShellScriptBuildPhase; 195 | buildActionMask = 2147483647; 196 | files = ( 197 | ); 198 | inputPaths = ( 199 | "${SRCROOT}/Pods/Target Support Files/Pods-Captcha/Pods-Captcha-frameworks.sh", 200 | "${BUILT_PRODUCTS_DIR}/Realm/Realm.framework", 201 | "${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework", 202 | "${BUILT_PRODUCTS_DIR}/SVProgressHUD/SVProgressHUD.framework", 203 | "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", 204 | ); 205 | name = "[CP] Embed Pods Frameworks"; 206 | outputPaths = ( 207 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework", 208 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework", 209 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SVProgressHUD.framework", 210 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", 211 | ); 212 | runOnlyForDeploymentPostprocessing = 0; 213 | shellPath = /bin/sh; 214 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Captcha/Pods-Captcha-frameworks.sh\"\n"; 215 | showEnvVarsInLog = 0; 216 | }; 217 | C7BFED27111FF67C09454F04 /* [CP] Check Pods Manifest.lock */ = { 218 | isa = PBXShellScriptBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | ); 222 | inputPaths = ( 223 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 224 | "${PODS_ROOT}/Manifest.lock", 225 | ); 226 | name = "[CP] Check Pods Manifest.lock"; 227 | outputPaths = ( 228 | "$(DERIVED_FILE_DIR)/Pods-Captcha-checkManifestLockResult.txt", 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | shellPath = /bin/sh; 232 | 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"; 233 | showEnvVarsInLog = 0; 234 | }; 235 | CFC8ACA666113FA61FE841C8 /* [CP] Copy Pods Resources */ = { 236 | isa = PBXShellScriptBuildPhase; 237 | buildActionMask = 2147483647; 238 | files = ( 239 | ); 240 | inputPaths = ( 241 | ); 242 | name = "[CP] Copy Pods Resources"; 243 | outputPaths = ( 244 | ); 245 | runOnlyForDeploymentPostprocessing = 0; 246 | shellPath = /bin/sh; 247 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Captcha/Pods-Captcha-resources.sh\"\n"; 248 | showEnvVarsInLog = 0; 249 | }; 250 | /* End PBXShellScriptBuildPhase section */ 251 | 252 | /* Begin PBXSourcesBuildPhase section */ 253 | D00DEF381FC103D900CDC5B1 /* Sources */ = { 254 | isa = PBXSourcesBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | D0838B421FC1085000BBFB27 /* Routes.swift in Sources */, 258 | D0838B3C1FC1085000BBFB27 /* AppDelegate.swift in Sources */, 259 | D012A6F41FC8633F0094EBFD /* Log.swift in Sources */, 260 | D0838B3D1FC1085000BBFB27 /* Request.swift in Sources */, 261 | D0838B3A1FC1085000BBFB27 /* ServerResponse.swift in Sources */, 262 | D0838B431FC1085000BBFB27 /* HistoryTableViewController.swift in Sources */, 263 | D0838B3E1FC1085000BBFB27 /* Client.swift in Sources */, 264 | D0838B411FC1085000BBFB27 /* SolveViewController.swift in Sources */, 265 | D0838B3B1FC1085000BBFB27 /* ConfigTableViewController.swift in Sources */, 266 | D0838B451FC10D1100BBFB27 /* AcknowledgmentsTableViewController.swift in Sources */, 267 | D0838B3F1FC1085000BBFB27 /* Account.swift in Sources */, 268 | D0838B401FC1085000BBFB27 /* SettingsTableViewController.swift in Sources */, 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | }; 272 | /* End PBXSourcesBuildPhase section */ 273 | 274 | /* Begin PBXVariantGroup section */ 275 | D00DEF431FC103D900CDC5B1 /* Main.storyboard */ = { 276 | isa = PBXVariantGroup; 277 | children = ( 278 | D00DEF441FC103D900CDC5B1 /* Base */, 279 | ); 280 | name = Main.storyboard; 281 | sourceTree = ""; 282 | }; 283 | D00DEF481FC103D900CDC5B1 /* LaunchScreen.storyboard */ = { 284 | isa = PBXVariantGroup; 285 | children = ( 286 | D00DEF491FC103D900CDC5B1 /* Base */, 287 | ); 288 | name = LaunchScreen.storyboard; 289 | sourceTree = ""; 290 | }; 291 | /* End PBXVariantGroup section */ 292 | 293 | /* Begin XCBuildConfiguration section */ 294 | D00DEF4C1FC103D900CDC5B1 /* Debug */ = { 295 | isa = XCBuildConfiguration; 296 | buildSettings = { 297 | ALWAYS_SEARCH_USER_PATHS = NO; 298 | CLANG_ANALYZER_NONNULL = YES; 299 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 300 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 301 | CLANG_CXX_LIBRARY = "libc++"; 302 | CLANG_ENABLE_MODULES = YES; 303 | CLANG_ENABLE_OBJC_ARC = YES; 304 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 305 | CLANG_WARN_BOOL_CONVERSION = YES; 306 | CLANG_WARN_COMMA = YES; 307 | CLANG_WARN_CONSTANT_CONVERSION = YES; 308 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 309 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 310 | CLANG_WARN_EMPTY_BODY = YES; 311 | CLANG_WARN_ENUM_CONVERSION = YES; 312 | CLANG_WARN_INFINITE_RECURSION = YES; 313 | CLANG_WARN_INT_CONVERSION = YES; 314 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 315 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 316 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 317 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 318 | CLANG_WARN_STRICT_PROTOTYPES = YES; 319 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 320 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 321 | CLANG_WARN_UNREACHABLE_CODE = YES; 322 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 323 | CODE_SIGN_IDENTITY = "iPhone Developer"; 324 | COPY_PHASE_STRIP = NO; 325 | DEBUG_INFORMATION_FORMAT = dwarf; 326 | ENABLE_STRICT_OBJC_MSGSEND = YES; 327 | ENABLE_TESTABILITY = YES; 328 | GCC_C_LANGUAGE_STANDARD = gnu11; 329 | GCC_DYNAMIC_NO_PIC = NO; 330 | GCC_NO_COMMON_BLOCKS = YES; 331 | GCC_OPTIMIZATION_LEVEL = 0; 332 | GCC_PREPROCESSOR_DEFINITIONS = ( 333 | "DEBUG=1", 334 | "$(inherited)", 335 | ); 336 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 337 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 338 | GCC_WARN_UNDECLARED_SELECTOR = YES; 339 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 340 | GCC_WARN_UNUSED_FUNCTION = YES; 341 | GCC_WARN_UNUSED_VARIABLE = YES; 342 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 343 | MTL_ENABLE_DEBUG_INFO = YES; 344 | ONLY_ACTIVE_ARCH = YES; 345 | SDKROOT = iphoneos; 346 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 347 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 348 | }; 349 | name = Debug; 350 | }; 351 | D00DEF4D1FC103D900CDC5B1 /* Release */ = { 352 | isa = XCBuildConfiguration; 353 | buildSettings = { 354 | ALWAYS_SEARCH_USER_PATHS = NO; 355 | CLANG_ANALYZER_NONNULL = YES; 356 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 357 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 358 | CLANG_CXX_LIBRARY = "libc++"; 359 | CLANG_ENABLE_MODULES = YES; 360 | CLANG_ENABLE_OBJC_ARC = YES; 361 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 362 | CLANG_WARN_BOOL_CONVERSION = YES; 363 | CLANG_WARN_COMMA = YES; 364 | CLANG_WARN_CONSTANT_CONVERSION = YES; 365 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 366 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 367 | CLANG_WARN_EMPTY_BODY = YES; 368 | CLANG_WARN_ENUM_CONVERSION = YES; 369 | CLANG_WARN_INFINITE_RECURSION = YES; 370 | CLANG_WARN_INT_CONVERSION = YES; 371 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 372 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 373 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 374 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 375 | CLANG_WARN_STRICT_PROTOTYPES = YES; 376 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 377 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 378 | CLANG_WARN_UNREACHABLE_CODE = YES; 379 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 380 | CODE_SIGN_IDENTITY = "iPhone Developer"; 381 | COPY_PHASE_STRIP = NO; 382 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 383 | ENABLE_NS_ASSERTIONS = NO; 384 | ENABLE_STRICT_OBJC_MSGSEND = YES; 385 | GCC_C_LANGUAGE_STANDARD = gnu11; 386 | GCC_NO_COMMON_BLOCKS = YES; 387 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 388 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 389 | GCC_WARN_UNDECLARED_SELECTOR = YES; 390 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 391 | GCC_WARN_UNUSED_FUNCTION = YES; 392 | GCC_WARN_UNUSED_VARIABLE = YES; 393 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 394 | MTL_ENABLE_DEBUG_INFO = NO; 395 | SDKROOT = iphoneos; 396 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 397 | VALIDATE_PRODUCT = YES; 398 | }; 399 | name = Release; 400 | }; 401 | D00DEF4F1FC103D900CDC5B1 /* Debug */ = { 402 | isa = XCBuildConfiguration; 403 | baseConfigurationReference = 6CD978C0F40E8978E2810314 /* Pods-Captcha.debug.xcconfig */; 404 | buildSettings = { 405 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 406 | CLANG_ENABLE_MODULES = YES; 407 | CODE_SIGN_STYLE = Automatic; 408 | DEVELOPMENT_TEAM = F62D38X3Q2; 409 | INFOPLIST_FILE = Captcha/Info.plist; 410 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 411 | PRODUCT_BUNDLE_IDENTIFIER = com.petersoboyejo.Captcha; 412 | PRODUCT_NAME = "$(TARGET_NAME)"; 413 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 414 | SWIFT_VERSION = 4.0; 415 | TARGETED_DEVICE_FAMILY = "1,2"; 416 | }; 417 | name = Debug; 418 | }; 419 | D00DEF501FC103D900CDC5B1 /* Release */ = { 420 | isa = XCBuildConfiguration; 421 | baseConfigurationReference = EEF11C4E141B38FC072DFAAC /* Pods-Captcha.release.xcconfig */; 422 | buildSettings = { 423 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 424 | CLANG_ENABLE_MODULES = YES; 425 | CODE_SIGN_STYLE = Automatic; 426 | DEVELOPMENT_TEAM = F62D38X3Q2; 427 | INFOPLIST_FILE = Captcha/Info.plist; 428 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 429 | PRODUCT_BUNDLE_IDENTIFIER = com.petersoboyejo.Captcha; 430 | PRODUCT_NAME = "$(TARGET_NAME)"; 431 | SWIFT_VERSION = 4.0; 432 | TARGETED_DEVICE_FAMILY = "1,2"; 433 | }; 434 | name = Release; 435 | }; 436 | /* End XCBuildConfiguration section */ 437 | 438 | /* Begin XCConfigurationList section */ 439 | D00DEF371FC103D900CDC5B1 /* Build configuration list for PBXProject "Captcha" */ = { 440 | isa = XCConfigurationList; 441 | buildConfigurations = ( 442 | D00DEF4C1FC103D900CDC5B1 /* Debug */, 443 | D00DEF4D1FC103D900CDC5B1 /* Release */, 444 | ); 445 | defaultConfigurationIsVisible = 0; 446 | defaultConfigurationName = Release; 447 | }; 448 | D00DEF4E1FC103D900CDC5B1 /* Build configuration list for PBXNativeTarget "Captcha" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | D00DEF4F1FC103D900CDC5B1 /* Debug */, 452 | D00DEF501FC103D900CDC5B1 /* Release */, 453 | ); 454 | defaultConfigurationIsVisible = 0; 455 | defaultConfigurationName = Release; 456 | }; 457 | /* End XCConfigurationList section */ 458 | }; 459 | rootObject = D00DEF341FC103D900CDC5B1 /* Project object */; 460 | } 461 | -------------------------------------------------------------------------------- /Captcha.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Captcha.xcodeproj/project.xcworkspace/xcuserdata/peter.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzt/captcha-ios/ce0996e8056eb3b67e1a35ed7f411a58f5acea32/Captcha.xcodeproj/project.xcworkspace/xcuserdata/peter.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Captcha.xcodeproj/xcuserdata/peter.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Captcha.xcscheme 8 | 9 | orderHint 10 | 5 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Captcha.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Captcha/Account.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Account.swift 3 | // Captcha 4 | // 5 | // Created by Peter Soboyejo on 10/7/17. 6 | // Copyright © 2017 Peter Soboyejo. All rights reserved. 7 | // 8 | 9 | import RealmSwift 10 | 11 | open class Account: Object { 12 | @objc open dynamic var userkey = "" 13 | @objc open dynamic var sitekey = "" 14 | @objc open dynamic var domain = "" 15 | } 16 | 17 | -------------------------------------------------------------------------------- /Captcha/AcknowledgmentsTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AcknowledgmentsTableViewController.swift 3 | // Captcha 4 | // 5 | // Created by Peter Soboyejo on 11/18/17. 6 | // Copyright © 2017 Peter Soboyejo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | import SafariServices 12 | import MessageUI 13 | 14 | class AcknowledgmentsTableViewController : UITableViewController, MFMailComposeViewControllerDelegate { 15 | 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | } 20 | 21 | func openURL(_ string: String) { 22 | if let url = URL(string: string) { 23 | let safariViewController = SFSafariViewController(url: url) 24 | present(safariViewController, animated: true, completion: nil) 25 | } 26 | } 27 | 28 | override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 29 | 30 | if indexPath.section == 0 && indexPath.row == 0 { 31 | openURL("https://github.com/SwiftyJSON/SwiftyJSON") 32 | } else if indexPath.section == 0 && indexPath.row == 1 { 33 | openURL("https://github.com/SVProgressHUD/SVProgressHUD") 34 | } else { 35 | openURL("https://github.com/realm/realm-cocoa") 36 | } 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Captcha/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Captcha 4 | // 5 | // Created by Peter Soboyejo on 11/13/17. 6 | // Copyright © 2017 Project Destroyer. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "29x29", 26 | "scale" : "3x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "40x40", 36 | "scale" : "3x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "57x57", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "iphone", 45 | "size" : "57x57", 46 | "scale" : "2x" 47 | }, 48 | { 49 | "idiom" : "iphone", 50 | "size" : "60x60", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "iphone", 55 | "size" : "60x60", 56 | "scale" : "3x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "20x20", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "20x20", 66 | "scale" : "2x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "29x29", 71 | "scale" : "1x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "29x29", 76 | "scale" : "2x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "40x40", 81 | "scale" : "1x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "40x40", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ipad", 90 | "size" : "50x50", 91 | "scale" : "1x" 92 | }, 93 | { 94 | "idiom" : "ipad", 95 | "size" : "50x50", 96 | "scale" : "2x" 97 | }, 98 | { 99 | "idiom" : "ipad", 100 | "size" : "72x72", 101 | "scale" : "1x" 102 | }, 103 | { 104 | "idiom" : "ipad", 105 | "size" : "72x72", 106 | "scale" : "2x" 107 | }, 108 | { 109 | "idiom" : "ipad", 110 | "size" : "76x76", 111 | "scale" : "1x" 112 | }, 113 | { 114 | "idiom" : "ipad", 115 | "size" : "76x76", 116 | "scale" : "2x" 117 | }, 118 | { 119 | "idiom" : "ipad", 120 | "size" : "83.5x83.5", 121 | "scale" : "2x" 122 | }, 123 | { 124 | "idiom" : "ios-marketing", 125 | "size" : "1024x1024", 126 | "scale" : "1x" 127 | } 128 | ], 129 | "info" : { 130 | "version" : 1, 131 | "author" : "xcode" 132 | } 133 | } -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/cog-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icons8_Settings_96.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8_Settings_96@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8_Settings_96@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/cog-icon.imageset/icons8_Settings_96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzt/captcha-ios/ce0996e8056eb3b67e1a35ed7f411a58f5acea32/Captcha/Assets.xcassets/cog-icon.imageset/icons8_Settings_96.png -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/cog-icon.imageset/icons8_Settings_96@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzt/captcha-ios/ce0996e8056eb3b67e1a35ed7f411a58f5acea32/Captcha/Assets.xcassets/cog-icon.imageset/icons8_Settings_96@2x.png -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/cog-icon.imageset/icons8_Settings_96@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzt/captcha-ios/ce0996e8056eb3b67e1a35ed7f411a58f5acea32/Captcha/Assets.xcassets/cog-icon.imageset/icons8_Settings_96@3x.png -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/icon-home.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Home-48.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Home-49.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/icon-home.imageset/Home-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzt/captcha-ios/ce0996e8056eb3b67e1a35ed7f411a58f5acea32/Captcha/Assets.xcassets/icon-home.imageset/Home-48.png -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/icon-home.imageset/Home-49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzt/captcha-ios/ce0996e8056eb3b67e1a35ed7f411a58f5acea32/Captcha/Assets.xcassets/icon-home.imageset/Home-49.png -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/solve-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "solve-icon-1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "solve-icon-2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "solve-icon.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/solve-icon.imageset/solve-icon-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzt/captcha-ios/ce0996e8056eb3b67e1a35ed7f411a58f5acea32/Captcha/Assets.xcassets/solve-icon.imageset/solve-icon-1x.png -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/solve-icon.imageset/solve-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzt/captcha-ios/ce0996e8056eb3b67e1a35ed7f411a58f5acea32/Captcha/Assets.xcassets/solve-icon.imageset/solve-icon-2x.png -------------------------------------------------------------------------------- /Captcha/Assets.xcassets/solve-icon.imageset/solve-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dzt/captcha-ios/ce0996e8056eb3b67e1a35ed7f411a58f5acea32/Captcha/Assets.xcassets/solve-icon.imageset/solve-icon.png -------------------------------------------------------------------------------- /Captcha/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /Captcha/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | AvenirNext-Regular 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 | 132 | 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 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 273 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 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 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 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 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 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 | -------------------------------------------------------------------------------- /Captcha/Client.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Client.swift 3 | // Captcha 4 | // 5 | // Created by Peter Soboyejo on 10/7/17. 6 | // Copyright © 2017 Peter Soboyejo. All rights reserved. 7 | // 8 | 9 | class Client { 10 | public class var shared: Client { 11 | struct Static { 12 | static let instance = Client() 13 | } 14 | return Static.instance 15 | } 16 | 17 | public let cr: Routes 18 | 19 | private init() { 20 | cr = Routes() 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /Captcha/ConfigTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ConfigTableViewController.swift 3 | // Captcha 4 | // 5 | // Created by Peter Soboyejo on 10/7/17. 6 | // Copyright © 2017 Peter Soboyejo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ConfigTableViewController: UITableViewController { 12 | 13 | @IBOutlet weak var sitekeyField: UITextField! 14 | @IBOutlet weak var domainField: UITextField! 15 | 16 | @IBOutlet weak var saveButton: UIBarButtonItem! 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Captcha/HistoryTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HistoryTableViewController.swift 3 | // Captcha 4 | // 5 | // Created by Peter Soboyejo on 10/8/17. 6 | // Copyright © 2017 Peter Soboyejo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RealmSwift 11 | 12 | class HistoryTableViewController: UITableViewController { 13 | 14 | private var errorLabel: UILabel! 15 | let realm = try! Realm() 16 | let items = try! Realm().objects(Log.self) 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | 21 | self.tableView.tableFooterView = UIView(frame: .zero) 22 | self.refreshControl?.addTarget(self, action: #selector(handleRefresh(refreshControl:)), for: UIControlEvents.valueChanged) 23 | 24 | errorLabel = UILabel() 25 | 26 | print(realm.objects(Log.self).count) 27 | 28 | if realm.objects(Log.self).count == 0 { 29 | errorLabel.numberOfLines = 0 30 | errorLabel.textAlignment = .center 31 | errorLabel.textColor = UIColor.black 32 | errorLabel.text = "No log history found." 33 | errorLabel.alpha = 1 34 | } 35 | 36 | view.addSubview(errorLabel) 37 | 38 | self.tableView.reloadData() 39 | 40 | 41 | } 42 | 43 | @objc func handleRefresh(refreshControl: UIRefreshControl) { 44 | print("hi") 45 | self.tableView.reloadData() 46 | if realm.objects(Log.self).count > 0 { 47 | errorLabel.alpha = 0 48 | } 49 | self.refreshControl?.endRefreshing() 50 | } 51 | 52 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 53 | return items.count 54 | } 55 | 56 | override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { 57 | if editingStyle == .delete { 58 | //self.tableArray.remove(at: indexPath.row) 59 | tableView.deleteRows(at: [indexPath], with: .fade) 60 | } 61 | } 62 | 63 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 64 | let cell = tableView.dequeueReusableCell(withIdentifier: "logCell", for: indexPath) 65 | let info = items[indexPath.row] 66 | cell.textLabel?.text = info.domain 67 | cell.detailTextLabel?.text = info.timestamp 68 | return cell 69 | } 70 | 71 | override func viewDidLayoutSubviews() { 72 | super.viewDidLayoutSubviews() 73 | let errorLabelFrame = errorLabel.textRect(forBounds: CGRect(x: 0, y: 0, width: view.frame.size.width - 64, height: CGFloat.greatestFiniteMagnitude), limitedToNumberOfLines: 10) 74 | errorLabel.frame = CGRect(x: (view.frame.size.width - errorLabelFrame.size.width) / 2, y: (view.frame.size.height - errorLabelFrame.size.height) / 10, width: errorLabelFrame.size.width, height: errorLabelFrame.size.height) 75 | } 76 | 77 | 78 | 79 | } 80 | -------------------------------------------------------------------------------- /Captcha/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | NSAppTransportSecurity 45 | 46 | NSExceptionDomains 47 | 48 | 127.0.0.1 49 | 50 | NSExceptionAllowsInsecureHTTPLoads 51 | 52 | 53 | herokuapp.com 54 | 55 | NSExceptionAllowsInsecureHTTPLoads 56 | 57 | NSIncludesSubdomains 58 | 59 | 60 | localhost 61 | 62 | NSExceptionAllowsInsecureHTTPLoads 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /Captcha/Log.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Log.swift 3 | // Captcha 4 | // 5 | // Created by Peter Soboyejo on 11/24/17. 6 | // Copyright © 2017 Peter Soboyejo. All rights reserved. 7 | // 8 | 9 | import RealmSwift 10 | 11 | open class Log: Object { 12 | @objc open dynamic var timestamp = "" 13 | @objc open dynamic var token = "" 14 | @objc open dynamic var sitekey = "" 15 | @objc open dynamic var domain = "" 16 | } 17 | -------------------------------------------------------------------------------- /Captcha/Request.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Request.swift 3 | // Captcha 4 | // 5 | // Created by Peter Soboyejo on 10/7/17. 6 | // Copyright © 2017 Peter Soboyejo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftyJSON 11 | 12 | class Request { 13 | 14 | private static var baseURL = "http://127.0.0.1:8080" 15 | 16 | class func request(_ endpoint: String, requestType: String = "GET", headers: [String: String] = [String: String](), params: [String: String] = [String: String](), body: Any? = nil, completion: ((_ json: JSON?, _ error: String?) -> Void)?) { 17 | Request.dataRequest("\(baseURL)\(endpoint)", requestType: requestType, headers: headers, params: params, body: body) { (data, error) in 18 | guard let data = data else { 19 | completion?(nil, error) 20 | return 21 | } 22 | let json = JSON(data: data) 23 | completion?(json, error) 24 | } 25 | } 26 | 27 | class func dataRequest(_ baseURL: String, requestType: String = "GET", headers: [String: String] = [String: String](), params: [String: String] = [String: String](), body: Any? = nil, completion: ((_ data: Data?, _ error: String?) -> Void)?) { 28 | let sessionConfig = URLSessionConfiguration.default 29 | sessionConfig.urlCache = nil 30 | let session = URLSession(configuration: sessionConfig, delegate: nil, delegateQueue: nil) 31 | 32 | var url = URL(string: baseURL)! 33 | url = URLByAppendingQueryParameters(url, queryParameters: params) 34 | 35 | var request = URLRequest(url: url) 36 | request.httpMethod = requestType 37 | 38 | if let body = body { 39 | do { 40 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type") 41 | request.httpBody = try JSONSerialization.data(withJSONObject: body, options: []) 42 | } catch { 43 | completion?(nil, "An unknown error occurred 1") 44 | return 45 | } 46 | } 47 | 48 | for (header, val) in headers { 49 | request.addValue(val, forHTTPHeaderField: header) 50 | } 51 | 52 | let task = session.dataTask(with: request) { (data, response, error) in 53 | guard let response = response as? HTTPURLResponse, let data = data else { 54 | completion?(nil, "Unknown Error has Occured 2") 55 | return 56 | } 57 | 58 | let json = JSON(data: data) 59 | var requestError: String 60 | 61 | if let error = error { 62 | switch error._code { 63 | case -1009: requestError = "Offline" 64 | default: break 65 | } 66 | 67 | completion?(nil, "An Error has occured 3") 68 | } else if response.statusCode != 200 && response.statusCode != 204 { 69 | switch response.statusCode { 70 | case 400: 71 | if let message = json["message"].string { 72 | requestError = message 73 | } else { 74 | requestError = "An unknown error occurred. 4" 75 | } 76 | case 401: requestError = "Unauthorized" 77 | case 403: requestError = "Access Denied" 78 | case 404: requestError = "Not Found" 79 | default: 80 | print("Unknown status code: \(response.statusCode)") 81 | requestError = "Unknown Error has Occured 5" 82 | } 83 | 84 | completion?(data, requestError) 85 | } else { 86 | completion?(data, nil) 87 | } 88 | } 89 | 90 | task.resume() 91 | } 92 | 93 | fileprivate class func stringFromQueryParameters(_ queryParameters: [String: String]) -> String { 94 | var parts = [String]() 95 | for (name, value) in queryParameters { 96 | let part = NSString(format: "%@=%@", 97 | name.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlHostAllowed)!, 98 | value.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlHostAllowed)!) 99 | parts.append(part as String) 100 | } 101 | return parts.joined(separator: "&") 102 | } 103 | 104 | fileprivate class func URLByAppendingQueryParameters(_ url: URL!, queryParameters: [String: String]) -> URL { 105 | let URLString = NSString(format: "%@?%@", url.absoluteString, stringFromQueryParameters(queryParameters)) 106 | return URL(string: URLString as String)! 107 | } 108 | 109 | } 110 | 111 | -------------------------------------------------------------------------------- /Captcha/Routes.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SFRoutes.swift 3 | // Captcha 4 | // 5 | // Created by Peter Soboyejo on 10/7/17. 6 | // Copyright © 2017 Peter Soboyejo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftyJSON 11 | 12 | class Routes { 13 | 14 | func sendCaptchaToken(user_token: String, captchaToken: String, completion: ((_ response: ServerResponse?, _ error: String?) -> Void)?) { 15 | 16 | var params = [String: String]() 17 | let body = [ 18 | "user_token": user_token, 19 | "captchaToken": captchaToken 20 | ] as [String: Any] 21 | 22 | Request.request("/api/submitToken", requestType: "POST", body: body) { json, error in 23 | guard let res = json?["message"].string else { 24 | completion?(nil, error) 25 | return 26 | } 27 | completion?(ServerResponse(json: json!), error) 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /Captcha/ServerResponse.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ServerResponse.swift 3 | // Captcha 4 | // 5 | // Created by Peter Soboyejo on 10/7/17. 6 | // Copyright © 2017 Peter Soboyejo. All rights reserved. 7 | // 8 | 9 | import SwiftyJSON 10 | 11 | class ServerResponse { 12 | 13 | var message: String? 14 | var error: Bool? 15 | 16 | init(json: JSON) { 17 | message = json["message"].string 18 | error = json["error"].bool 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /Captcha/SettingsTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsTableViewController.swift 3 | // Captcha 4 | // 5 | // Created by Peter Soboyejo on 10/7/17. 6 | // Copyright © 2017 Peter Soboyejo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | import SafariServices 12 | import MessageUI 13 | 14 | class SettingsTableViewController : UITableViewController, MFMailComposeViewControllerDelegate { 15 | 16 | @IBOutlet weak var versionLabel: UILabel! 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | versionLabel.text = "\(Bundle.main.releaseVersionNumber!) (\(Bundle.main.buildVersionNumber!))" 21 | } 22 | 23 | func openTwitter(_ username: String) { 24 | let urls = ["tweetbot://current/user_profile/\(username)", "twitterrific://current/profile?screen_name=\(username)", "twitter://user?screen_name=\(username)"] 25 | for url in urls { 26 | if let url = URL(string: url), UIApplication.shared.canOpenURL(url) { 27 | UIApplication.shared.open(url, options: [:], completionHandler: nil) 28 | return 29 | } 30 | } 31 | openURL("https://twitter.com/\(username)") 32 | } 33 | 34 | func openURL(_ string: String) { 35 | if let url = URL(string: string) { 36 | let safariViewController = SFSafariViewController(url: url) 37 | present(safariViewController, animated: true, completion: nil) 38 | } 39 | } 40 | 41 | override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 42 | 43 | if indexPath.section == 0 && indexPath.row == 0 { 44 | print("Config") 45 | self.performSegue(withIdentifier: "configModalToPush", sender: self) 46 | } else if indexPath.section == 1 && indexPath.row == 0 { 47 | let mailComposeViewController = configuredMailComposeViewController() 48 | if MFMailComposeViewController.canSendMail() { 49 | self.present(mailComposeViewController, animated: true, completion: nil) 50 | } else { 51 | self.showSendMailErrorAlert() 52 | } 53 | } else if indexPath.section == 1 && indexPath.row == 1 { 54 | openURL("https://github.com/dzt/captcha-ios") 55 | } else if indexPath.section == 2 && indexPath.row == 0 { 56 | print("Version") 57 | } else { 58 | self.performSegue(withIdentifier: "acknowledgmentsModalToPush", sender: self) 59 | } 60 | } 61 | 62 | func configuredMailComposeViewController() -> MFMailComposeViewController { 63 | let mailComposerVC = MFMailComposeViewController() 64 | mailComposerVC.mailComposeDelegate = self 65 | 66 | mailComposerVC.setToRecipients(["thepcmrtim@gmail.com"]) 67 | mailComposerVC.setSubject("Captcha Solver") 68 | 69 | return mailComposerVC 70 | } 71 | 72 | func showSendMailErrorAlert() { 73 | let sendMailErrorAlert = UIAlertView(title: "Could Not Send Email", message: "Your device could not send e-mail. Please check e-mail configuration and try again.", delegate: self, cancelButtonTitle: "OK") 74 | sendMailErrorAlert.show() 75 | } 76 | 77 | // MARK: MFMailComposeViewControllerDelegate 78 | 79 | func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) { 80 | 81 | controller.dismiss(animated: true, completion: nil) 82 | 83 | } 84 | } 85 | 86 | extension Bundle { 87 | var releaseVersionNumber: String? { 88 | return infoDictionary?["CFBundleShortVersionString"] as? String 89 | } 90 | var buildVersionNumber: String? { 91 | return infoDictionary?["CFBundleVersion"] as? String 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Captcha/SolveViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SolveViewController.swift 3 | // Captcha 4 | // 5 | // Created by Peter Soboyejo on 10/7/17. 6 | // Copyright © 2017 Peter Soboyejo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import WebKit 11 | import SVProgressHUD 12 | import RealmSwift 13 | 14 | class SolveViewController: UIViewController, WKUIDelegate, WKNavigationDelegate, WKScriptMessageHandler { 15 | 16 | var webView: WKWebView! 17 | private var timer: Timer? 18 | 19 | @IBAction func refreshButton(_ sender: Any) { 20 | self.loadPage() 21 | } 22 | 23 | let sitekey = "6LeoeSkTAAAAAA9rkZs5oS82l69OEYjKRZAiKdaF" 24 | let baseURL = "http://checkout.shopify.com" 25 | let imageURL = "" 26 | 27 | override func loadView() { 28 | let webConfiguration = WKWebViewConfiguration() 29 | webConfiguration.userContentController.add(self, name: "captchaReceived") 30 | 31 | self.webView = WKWebView(frame: .zero, configuration: webConfiguration) 32 | self.webView.navigationDelegate = self 33 | self.webView.scrollView.bounces = false 34 | self.webView.isMultipleTouchEnabled = true 35 | self.webView.contentMode = .scaleToFill 36 | self.webView.contentScaleFactor = 15.0 37 | self.webView.scrollView.isScrollEnabled = false 38 | self.webView.uiDelegate = self 39 | view = webView 40 | } 41 | 42 | override func viewDidLoad() { 43 | super.viewDidLoad() 44 | let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: "dismissKeyboard") 45 | view.addGestureRecognizer(tap) 46 | loadPage() 47 | } 48 | 49 | func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { 50 | print("Page has loaded") 51 | SVProgressHUD.dismiss() 52 | } 53 | 54 | func fetchForToken() { 55 | self.webView.evaluateJavaScript("document.getElementById('g-recaptcha-response').value;") { (any,error) -> Void in 56 | let response = any as! String 57 | if response != "" { 58 | 59 | SVProgressHUD.show() 60 | 61 | Client.shared.cr.sendCaptchaToken(user_token: "rawr xD", captchaToken: response) { summary, error in 62 | guard summary != nil else { 63 | print("Error sending token.") 64 | let errAlert = UIAlertController(title: "Error Occured", message: "An error has occured while trying to subit your captcha token please try again.", preferredStyle: UIAlertControllerStyle.alert) 65 | errAlert.addAction(UIAlertAction(title: "Okay", style: UIAlertActionStyle.default, handler: nil)) 66 | self.present(errAlert, animated: true, completion: nil) 67 | SVProgressHUD.dismiss() 68 | return self.loadPage() 69 | } 70 | 71 | 72 | DispatchQueue.main.async { 73 | SVProgressHUD.dismiss() 74 | 75 | let log = Log() 76 | 77 | let date = Date() 78 | let formatter = DateFormatter() 79 | formatter.dateFormat = "E, d MMM yyyy HH:mm:ss" 80 | 81 | log.timestamp = formatter.string(from: date) 82 | log.token = response 83 | log.sitekey = "6LeoeSkTAAAAAA9rkZs5oS82l69OEYjKRZAiKdaF" 84 | log.domain = "checkout.shopify.com" 85 | 86 | let realm = try! Realm() 87 | try! realm.write { 88 | realm.add(log) 89 | } 90 | 91 | let myAlert = UIAlertController(title: "Token Sent!", message: "Captcha Token has been sent.", preferredStyle: UIAlertControllerStyle.alert) 92 | myAlert.addAction(UIAlertAction(title: "Okay", style: UIAlertActionStyle.default, handler: nil)) 93 | self.present(myAlert, animated: true, completion: nil) 94 | return self.loadPage() 95 | 96 | } 97 | } 98 | 99 | } 100 | 101 | } 102 | } 103 | 104 | func loadPage() { 105 | SVProgressHUD.setDefaultStyle(SVProgressHUDStyle.light) 106 | SVProgressHUD.setDefaultMaskType(SVProgressHUDMaskType.black) 107 | SVProgressHUD.show() 108 | 109 | self.webView.loadHTMLString("\r\n\r\n\r\n\r\n




\r\n\r\n", baseURL: URL(string: baseURL)) 110 | } 111 | 112 | func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { 113 | self.fetchForToken() 114 | } 115 | 116 | 117 | } 118 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 peter soboyejo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '10.0' 2 | use_frameworks! 3 | 4 | target 'Captcha' do 5 | pod 'SwiftyJSON' 6 | pod 'SVProgressHUD' 7 | pod 'RealmSwift' 8 | end 9 | 10 | post_install do |installer| 11 | installer.pods_project.targets.each do |target| 12 | target.build_configurations.each do |config| 13 | config.build_settings['SWIFT_VERSION'] = '3.0' 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Realm (2.10.0): 3 | - Realm/Headers (= 2.10.0) 4 | - Realm/Headers (2.10.0) 5 | - RealmSwift (2.10.0): 6 | - Realm (= 2.10.0) 7 | - SVProgressHUD (2.1.2) 8 | - SwiftyJSON (3.1.4) 9 | 10 | DEPENDENCIES: 11 | - RealmSwift 12 | - SVProgressHUD 13 | - SwiftyJSON 14 | 15 | SPEC CHECKSUMS: 16 | Realm: 98b3a25643cf6b3e07d2b99fb43fe0eb9c801dec 17 | RealmSwift: 34073ad3a31232bbaf7c0db898c037940284cba2 18 | SVProgressHUD: c404a55d78acbeb7ebb78b76d3faf986475a6994 19 | SwiftyJSON: c2842d878f95482ffceec5709abc3d05680c0220 20 | 21 | PODFILE CHECKSUM: 3f207c1a37b4e2923e3f4695e1d877127dd14ba3 22 | 23 | COCOAPODS: 1.3.1 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # captcha-ios 2 | Magical iOS Captcha Solver thing that allows you to utilize this base to any one of your uses cases with the power of a simple HTTP Post Request. 3 | 4 | ![ios](https://i.imgur.com/6VPWFFS.png) 5 | 6 | 7 | ### Who 8 | Written by @dzt, made better by you. 9 | 10 | ### Like my work? 11 | Donate me Bitcoin `1BMkdD7Q8ywwHFHShQLUD1Ks1YviE4R9Zm` so I can buy pods and make more stuff for y'all. 12 | 13 | ## License 14 | 15 | ``` 16 | The MIT License (MIT) 17 | 18 | Copyright (c) 2017 Peter Soboyejo 19 | 20 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | ``` 26 | --------------------------------------------------------------------------------