{"id":17774294,"url":"https://github.com/dominhhai/captcha-breaker","last_synced_at":"2025-03-15T16:32:48.889Z","repository":{"id":38802459,"uuid":"137845235","full_name":"dominhhai/captcha-breaker","owner":"dominhhai","description":"High Accuracy Captcha Breaker with Tensorflow and Node.js","archived":false,"fork":false,"pushed_at":"2022-11-22T04:29:09.000Z","size":28,"stargazers_count":138,"open_issues_count":14,"forks_count":38,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-27T03:49:07.027Z","etag":null,"topics":["captcha","nodejs","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dominhhai.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-19T05:44:00.000Z","updated_at":"2025-02-23T14:55:36.000Z","dependencies_parsed_at":"2023-01-21T08:17:27.319Z","dependency_job_id":null,"html_url":"https://github.com/dominhhai/captcha-breaker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominhhai%2Fcaptcha-breaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominhhai%2Fcaptcha-breaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominhhai%2Fcaptcha-breaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominhhai%2Fcaptcha-breaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dominhhai","download_url":"https://codeload.github.com/dominhhai/captcha-breaker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243760345,"owners_count":20343626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["captcha","nodejs","tensorflow"],"created_at":"2024-10-26T21:50:22.637Z","updated_at":"2025-03-15T16:32:48.138Z","avatar_url":"https://github.com/dominhhai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Captcha Breaker\nBuild with Tensorflow (ConvNets) and  Node.js :muscle::muscle::muscle:\n\nE.x: *Amazon Captcha* (click image below to watch demo video)\n\n[![Amazon Captcha](https://i.ytimg.com/vi/pruaoG-MSo4/hqdefault.jpg)](https://youtu.be/pruaoG-MSo4)\n\n# Installation\n#### Python packages\n```\n$ pip install -r requirements.txt\n```\n\n#### Node.js packages (Node.js user only)\n```\n$ npm i\n```\n\n# Usage\n## 1. Create train data\n#### Prepare your training dataset\n* Copy captcha images to `data/captcha` folder\n```\n|_data\n      |_captcha\n          |_ xss7.jpg\n          |_ tvu4.jpg\n```\n**IMPORTANT:** Note each image file is named with it's own solution.\n\nThat means that if an image is named `A1bD3.jpg`, it corresponds to a captcha's whose solution is `A1bD3`  \n\n#### Build train data for model\nRun `src/create_train_data.py` will save your train data as `data/captcha.npz` compressed file.\n```\n$ python src/create_train_data.py\n```\n\nThe compressed `data/captcha.npz` includes:\n* Train Data ( `x_train`, `y_train` ): `80%`\n* Test Data ( `x_test`, `y_test` ): `20%`\n\n## 2. Train\nRun `src/train.py` to train the model with your own dataset.\n```\n$ python src/train.py\n```\n\nTake :coffee: or :tea: while waiting!\n\n## 3. Attack\nNow, enjoy your war :fire::fire::fire: :stuck_out_tongue_winking_eye::stuck_out_tongue_winking_eye::stuck_out_tongue_winking_eye:\n\n#### Python\n```\n$ python src/predict --fname YOUR_IMAGE_PATH_or_URL\n```\n\nSample output:\n```\nloading image: data/captcha/captcha_2.jpg\nload captcha classifier\npredict for 1 char: `X` with probability: 99.956%\npredict for 2 char: `I` with probability: 99.909%\npredict for 3 char: `N` with probability: 99.556%\npredict for 4 char: `C` with probability: 99.853%\npredict for 5 char: `H` with probability: 99.949%\npredict for 6 char: `A` with probability: 98.889%\nCaptcha: `XINCHA` with confident: `99.686%`\nXINCHA\n```\n\n#### Node.js\n```js\nconst captchaPredict = require('src/predict')\n\ncaptchaPredict(YOUR_IMAGE_PATH_or_URL)\n  .then(console.log)\n  .catch(console.error)\n```\nSample output:\n```\n[\n  \"loading image: data/captcha/captcha_2.jpg\",\n  \"load captcha classifier\",\n  \"predict for 1 char: `X` with probability: 99.956%\",\n  \"predict for 2 char: `I` with probability: 99.909%\",\n  \"predict for 3 char: `N` with probability: 99.556%\",\n  \"predict for 4 char: `C` with probability: 99.853%\",\n  \"predict for 5 char: `H` with probability: 99.949%\",\n  \"predict for 6 char: `A` with probability: 98.889%\",\n  \"Captcha: `XINCHA` with confident: `99.686%`\",\n  \"XINCHA\"\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominhhai%2Fcaptcha-breaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdominhhai%2Fcaptcha-breaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominhhai%2Fcaptcha-breaker/lists"}