{"id":28976150,"url":"https://github.com/gubarz/gohtb","last_synced_at":"2025-06-24T13:17:41.071Z","repository":{"id":300739590,"uuid":"1005960889","full_name":"Gubarz/gohtb","owner":"Gubarz","description":"A clean and easy to use Go SDK for the Hack The Box API.","archived":false,"fork":false,"pushed_at":"2025-06-21T22:07:09.000Z","size":1177,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T11:08:27.192Z","etag":null,"topics":["api","go","hackthebox","htb"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gubarz.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-06-21T07:10:49.000Z","updated_at":"2025-06-22T17:45:19.000Z","dependencies_parsed_at":"2025-06-23T11:08:30.563Z","dependency_job_id":"318d44cb-3d53-4b40-80eb-de3884f097ce","html_url":"https://github.com/Gubarz/gohtb","commit_stats":null,"previous_names":["gubarz/gohtb"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Gubarz/gohtb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gubarz%2Fgohtb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gubarz%2Fgohtb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gubarz%2Fgohtb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gubarz%2Fgohtb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gubarz","download_url":"https://codeload.github.com/Gubarz/gohtb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gubarz%2Fgohtb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261683195,"owners_count":23193694,"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":["api","go","hackthebox","htb"],"created_at":"2025-06-24T13:17:40.322Z","updated_at":"2025-06-24T13:17:41.055Z","avatar_url":"https://github.com/Gubarz.png","language":"Go","funding_links":["https://ko-fi.com/gubarz"],"categories":[],"sub_categories":[],"readme":"# gohtb\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/gubarz/gohtb/main/assets/logo.png\" width=\"200\" alt=\"gohtb logo\" /\u003e\n\u003c/p\u003e\n\n\u003e A clean and easy to use Go SDK for the Hack The Box API.\n\n## Install\n```bash\ngo get github.com/gubarz/gohtb@latest\n```\n\n## Quick Start\n```go\nclient, _ := gohtb.New(os.Getenv(\"HTB_TOKEN\"))\n\nmachines, _ := client.Machines.ListActive().ByOS(\"Linux\").Results(ctx)\n\nfor _, m := range machines.Data.ByDifficulty(\"Easy\") {\n    fmt.Println(m.Name)\n}\n```\n\n## Examples\n\nSee [examples](examples/) for a curated list of examples on how to use.\n\n## Why This Was Created\n\nI built `gohtb` because I want a reliable, reusable foundation for working with the Hack The Box API in Go. While building tools on top of the platform, I realized there was no structured SDK or up-to-date reference material available.\n\nRather than duplicate logic across projects, `gohtb` was designed to:\n\n- Provide a clean, idiomatic Go interface for Hack The Box's API\n- Standardize interactions with machines, challenges, VPN servers, and more\n- Simplify flag submission, obtaining product details, VPN configuration, and automation workflows\n- Serve as a foundation for building tools, scripts, or bots that integrate with HTB\n\n`gohtb` aims to simplify development, reduce boilerplate, and make HTB automation approachable for anyone working in Go.\n\n## API Specification\n\nThis SDK is based on [UnOfficial HackTheBox OpenAPI spec](https://github.com/gubarz/unofficial-htb-api).\nIt uses [oapi-codegen](https://github.com/deepmap/oapi-codegen) for base generation.\n\n## Contributions\n\nContributions are welcome! If you’d like to add features, improve documentation, or report bugs, feel free to open an issue or submit a pull request.\n\nIdeas, feedback, and feature suggestions are always appreciated. This project exists to make HTB development in Go easier for everyone, your input helps make that possible.\n\n## License\nLicensed under [Unlicense](LICENSE)\n\n---\n\n💚 Found this SDK useful? Support the project: https://ko-fi.com/gubarz","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgubarz%2Fgohtb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgubarz%2Fgohtb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgubarz%2Fgohtb/lists"}