{"id":30616539,"url":"https://github.com/lxhtt/capjs-solver-cpp","last_synced_at":"2025-08-30T09:41:45.803Z","repository":{"id":312137047,"uuid":"1046471468","full_name":"LxHTT/Capjs-Solver-Cpp","owner":"LxHTT","description":"A high-performance C++ implementation of the Cap.js solver.","archived":false,"fork":false,"pushed_at":"2025-08-28T18:34:15.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-29T00:52:30.841Z","etag":null,"topics":["anti-abuse","anti-bot","anti-scraper","antispam","cap","capjs","captcha","cpp","defense","hashcash","proof-of-work","turing-test"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LxHTT.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-28T18:30:09.000Z","updated_at":"2025-08-28T18:59:44.000Z","dependencies_parsed_at":"2025-08-29T00:52:32.644Z","dependency_job_id":"af327c24-c240-4b99-8837-ff57f82461e0","html_url":"https://github.com/LxHTT/Capjs-Solver-Cpp","commit_stats":null,"previous_names":["lxhtt/capjs-solver-cpp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/LxHTT/Capjs-Solver-Cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LxHTT%2FCapjs-Solver-Cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LxHTT%2FCapjs-Solver-Cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LxHTT%2FCapjs-Solver-Cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LxHTT%2FCapjs-Solver-Cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LxHTT","download_url":"https://codeload.github.com/LxHTT/Capjs-Solver-Cpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LxHTT%2FCapjs-Solver-Cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272833294,"owners_count":25000870,"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-08-30T02:00:09.474Z","response_time":77,"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":["anti-abuse","anti-bot","anti-scraper","antispam","cap","capjs","captcha","cpp","defense","hashcash","proof-of-work","turing-test"],"created_at":"2025-08-30T09:41:45.047Z","updated_at":"2025-08-30T09:41:45.748Z","avatar_url":"https://github.com/LxHTT.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cap.js C++ Solver\n\nA high-performance C++ implementation of the Cap.js solver.\n\n## Requirements\n\n- C++17 compatible compiler (GCC 7+, Clang 5+, MSVC 2019+)\n- CMake 3.15+\n- pthread support\n\n## Build\n\n### Quick Start\n\n```bash\ngit clone https://github.com/LxHTT/Capjs-Solver-Cpp.git\n\nmkdir build \u0026\u0026 cd build\n\ncmake ..\n\nmake -j$(nproc)\n```\n\n### Build Options\n\n```bash\n# Default build (shared libs, examples, tests)\ncmake ..\n\n# Static library only\ncmake -DBUILD_SHARED_LIBS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF ..\n\n# Debug build\ncmake -DCMAKE_BUILD_TYPE=Debug ..\n\n# Release build with optimizations\ncmake -DCMAKE_BUILD_TYPE=Release ..\n```\n\n### Build Targets\n\n```bash\nmake                   # Build all enabled targets\nmake solver            # Main solver executable\nmake examples          # Build all examples\nmake tests             # Build all tests\n```\n\n## Usage\n\n### C++ API\n\n```cpp\n#include \"challenge_solver.h\"\n\ncap::SolveConfig config;\nconfig.c = 5;        // 5 challenges\nconfig.s = 16;       // 16-byte salt\nconfig.d = 3;        // difficulty 3\n\nauto solutions = cap::ChallengeSolver::solve(\"token\", config);\n```\n\n### C API\n\n```c\n#include \"cap_c_api.h\"\n\nuint64_t nonce = cap_solve_pow(\"salt\", \"00\");\nuint64_t results[3];\ncap_solve_challenges(\"token\", 3, 16, 3, results);\n```\n\n### Python API\n\n```python\nfrom examples.python_api.python_api_example import CapSolver\nsolver = CapSolver()\nnonce = solver.solve_pow(\"salt\", \"00\")\n```\n\n### C# API\n\n```bash\n# Build C# examples\ncd examples/csharp_api\ndotnet build CsharpApiExample.csproj\ndotnet run\n```\n\n## Library Usage\n\nAfter installation, link against the library:\n\n```bash\n# Static library\ng++ -lcap_solver -pthread my_app.cpp\n\n# Shared library  \ng++ -lcap_solver my_app.cpp\n```\n\n## Output Format\n\nAll tools use minimal output format:\n\n- `nonce: 12345` - Single challenge result\n- `solutions: [123, 456, 789]` - Multiple results\n- `error: message` - Error messages\n\n## License\n\nSee LICENSE file in repository root.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flxhtt%2Fcapjs-solver-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flxhtt%2Fcapjs-solver-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flxhtt%2Fcapjs-solver-cpp/lists"}