{"id":14066602,"url":"https://github.com/decryptr/api","last_synced_at":"2025-07-29T23:31:45.874Z","repository":{"id":114022416,"uuid":"96657132","full_name":"decryptr/api","owner":"decryptr","description":"Dockerfile and plumber to break captchas","archived":false,"fork":false,"pushed_at":"2019-09-05T14:27:29.000Z","size":47,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-04T06:36:35.842Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/decryptr.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-07-09T02:47:04.000Z","updated_at":"2023-01-27T21:30:58.000Z","dependencies_parsed_at":"2023-05-22T07:15:42.056Z","dependency_job_id":null,"html_url":"https://github.com/decryptr/api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/decryptr/api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decryptr%2Fapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decryptr%2Fapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decryptr%2Fapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decryptr%2Fapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decryptr","download_url":"https://codeload.github.com/decryptr/api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decryptr%2Fapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267779993,"owners_count":24143201,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-13T07:05:10.909Z","updated_at":"2025-07-29T23:31:45.613Z","avatar_url":"https://github.com/decryptr.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# decryptr/api\n\nDockerfile and plumber to start the api.\n\n## Usage\n\nTo serve the API on [http://localhost:80](http://localhost:80)\nwith no load balancing, run the command below:\n\n```\ndocker build -t api .\ndocker run -p 80:80 api\n```\n\n## Adding a new key\n\nOne can add new keys using the `key_generator` function found in `key-generator.R`.\nKeys are a sequence of 64 random generated elements and their hash is saved in the `keys.yaml` file. The generated key can only be seen once.\n\nTo generate a new key you need to run:\n\n```\nsource(\"key-generator.R\")\nkey_generator(\"name-of-the-endpoint\")\n```\n\nThe function will make necessary modifications to `keys.yaml`. They generated key will be printed to the console. **Note** The key is printed only once.\n\n## Updating the endpoint\n\nOn shell, type:\n\n```\ndocker build -t dfalbel/api .\ndocker push dfalbel/api\ngcloud compute instances create-with-container decryptr \\\n --project=decryptr-196601 \\\n --container-image dfalbel/api \\\n --machine-type g1-small \\\n --tags http-server \\\n --address 104.197.127.86 \\\n --metadata startup-script='#! /bin/bash\nsudo iptables -w -A INPUT -p tcp --dport 80 -j ACCEPT\nEOF\n'\n```\n\nYou must have `gcloud` CLI installed.\n\n## Using from R\n\nYou can use the API from with the following chunk of code:\n\n```\nlibrary(magrittr)\n\n# parameters\narq \u003c- \"https://decryptr.netlify.com/img/sample-captcha.png\"\nkey \u003c- \"your-api-key\"\n\n# converting the image to base64\n\nimg \u003c- arq %\u003e%\n  readr::read_file_raw() %\u003e%\n  base64enc::base64encode()\n\n# post request\nres \u003c- httr::POST(\n  \"https://decryptr.now.sh/rfb\",\n  body = list(\n    img = img,\n    key = key\n  ),\n  encode = \"json\"\n)\n\nhttr::content(res)\n```\n\nPlease visit [decryptr.netlify.com](http://decryptr.netlify.com) fore more info and to obtain your own key.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecryptr%2Fapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecryptr%2Fapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecryptr%2Fapi/lists"}