{"id":18852707,"url":"https://github.com/tatsh/bincookie","last_synced_at":"2026-05-02T23:01:35.869Z","repository":{"id":141713692,"uuid":"48296886","full_name":"Tatsh/bincookie","owner":"Tatsh","description":"Header-only binarycookies parser.","archived":false,"fork":false,"pushed_at":"2026-04-28T06:47:30.000Z","size":4684,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-28T08:29:27.519Z","etag":null,"topics":["binarycookies","cookies","ios","library","macos","parser"],"latest_commit_sha":null,"homepage":"https://tatsh.github.io/bincookie/","language":"C","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/Tatsh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"Tatsh","ko_fi":"tatsh2","liberapay":"tatsh2","patreon":"tatsh2"}},"created_at":"2015-12-19T20:56:25.000Z","updated_at":"2026-04-28T06:47:32.000Z","dependencies_parsed_at":"2023-07-11T19:34:32.033Z","dependency_job_id":"de6a90f0-3275-4d72-8204-5efc549daa39","html_url":"https://github.com/Tatsh/bincookie","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Tatsh/bincookie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatsh%2Fbincookie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatsh%2Fbincookie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatsh%2Fbincookie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatsh%2Fbincookie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tatsh","download_url":"https://codeload.github.com/Tatsh/bincookie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatsh%2Fbincookie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32552379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T22:28:24.418Z","status":"ssl_error","status_checked_at":"2026-05-02T22:28:14.225Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["binarycookies","cookies","ios","library","macos","parser"],"created_at":"2024-11-08T03:41:16.515Z","updated_at":"2026-05-02T23:01:35.848Z","avatar_url":"https://github.com/Tatsh.png","language":"C","funding_links":["https://github.com/sponsors/Tatsh","https://ko-fi.com/tatsh2","https://liberapay.com/tatsh2","https://patreon.com/tatsh2","https://buymeacoffee.com/Tatsh","https://www.patreon.com/Tatsh2"],"categories":[],"sub_categories":[],"readme":"# bincookie\n\n\u003c!-- WISWA-GENERATED-README:START --\u003e\n\n[![C](https://img.shields.io/badge/C-00599C?logo=c)](\u003chttps://en.wikipedia.org/wiki/C_(programming_language)\u003e)\n[![GitHub tag (with filter)](https://img.shields.io/github/v/tag/Tatsh/bincookie)](https://github.com/Tatsh/bincookie/tags)\n[![License](https://img.shields.io/github/license/Tatsh/bincookie)](https://github.com/Tatsh/bincookie/blob/master/LICENSE.txt)\n[![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/Tatsh/bincookie/v0.1.8/master)](https://github.com/Tatsh/bincookie/compare/v0.1.8...master)\n[![Dependabot](https://img.shields.io/badge/Dependabot-enabled-blue?logo=dependabot)](https://github.com/dependabot)\n[![GitHub Pages](https://github.com/Tatsh/bincookie/actions/workflows/pages.yml/badge.svg)](https://tatsh.github.io/bincookie/)\n[![Stargazers](https://img.shields.io/github/stars/Tatsh/bincookie?logo=github\u0026style=flat)](https://github.com/Tatsh/bincookie/stargazers)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n[![CMake](https://img.shields.io/badge/CMake-6E6E6E?logo=cmake)](https://cmake.org/)\n[![Prettier](https://img.shields.io/badge/Prettier-black?logo=prettier)](https://prettier.io/)\n\n[![@Tatsh](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fpublic.api.bsky.app%2Fxrpc%2Fapp.bsky.actor.getProfile%2F%3Factor=did%3Aplc%3Auq42idtvuccnmtl57nsucz72\u0026query=%24.followersCount\u0026label=Follow+%40Tatsh\u0026logo=bluesky\u0026style=social)](https://bsky.app/profile/Tatsh.bsky.social)\n[![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Tatsh-black?logo=buymeacoffee)](https://buymeacoffee.com/Tatsh)\n[![Libera.Chat](https://img.shields.io/badge/Libera.Chat-Tatsh-black?logo=liberadotchat)](irc://irc.libera.chat/Tatsh)\n[![Mastodon Follow](https://img.shields.io/mastodon/follow/109370961877277568?domain=hostux.social\u0026style=social)](https://hostux.social/@Tatsh)\n[![Patreon](https://img.shields.io/badge/Patreon-Tatsh2-F96854?logo=patreon)](https://www.patreon.com/Tatsh2)\n\n\u003c!-- WISWA-GENERATED-README:STOP --\u003e\n\nApple has their own special binary cookie format, undocumented, in use on both OS X and heavily on iOS.\n\n## How to build\n\nThere is no build process for this library on its own. Just include the header:\n\n```c\n#include \u003cbincookie.h\u003e\n```\n\n## Installation\n\n### Header-only\n\nJust copy `bincookie.h` to somewhere in your project and include it.\n\nPackage maintainers: if you do not want the example binary and do not want to have to install CMake,\nyou only need to place `bincookie.h` in a standard include directory such as `/usr/include`.\n\n### CMake\n\nInstall CMake and make sure it is in `PATH`. Then in your terminal:\n\n1. `git clone https://github.com/Tatsh/bincookie.git`\n2. `cd bincookie`\n3. `mkdir build`\n4. `cmake -DCMAKE_INSTALL_PREFIX=\u003cprefix\u003e -DCMAKE_BUILD_TYPE=RelWithDebInfo`\n5. `make install`\n\nTo build the examples, add `-DWITH_EXAMPLES=ON` to step 4.\n\nTo build the documentation with Doxygen, add `-DWITH_DOCS=ON` to step 4.\n\nTo run tests, build with `-DWITH_TESTS=ON` and run `ctest` after building. CMocka must be installed\nto build tests.\n\nReplace `\u003cprefix\u003e` with a value like `/usr/local`, `/usr/`, or `/opt/local` (MacPorts).\n\n## Functions\n\nBe sure to `#include \u003cbincookie.h\u003e` (which is installed with `make install`).\n\n`bincookie_t *const bincookie_init_path(const char *file_path)` - Initialise a `bincookie_t` type.\n\n`bincookie_t *const bincookie_init_file(FILE *fin)` - Initialise a `bincookie_t` type with an open\nfile handle.\n\n`bincookie_page_t *const bincookie_iter_pages(const bincookie_t *bc, bincookie_iter_state_t *const state)`\nIterate pages of a file.\n\n`bincookie_cookie_t *const bincookie_iter_cookies(const bincookie_page_t *page, unsigned int *cookie_index)`\nIterate cookies contained within a page. `cookie_index` must be set to 0 before calling this\n(including in between iteration of pages).\n\n## Macros\n\n`bool bincookie_is_secure(bincookie_cookie_t *cookie)` - Test if a cookie has secure bit set.\n\n`bool bincookie_domain_access_full(bincookie_cookie_t *cookie)` - Test if a cookie can be used by all\nsubdomains.\n\n`char *bincookie_domain(bincookie_cookie_t *cookie)` - Get the domain name for a cookie.\n\n`char *bincookie_path(bincookie_cookie_t *cookie)` - Get the path for a cookie.\n\n`char *bincookie_name(bincookie_cookie_t *cookie)` - Get the name of a cookie.\n\n`char *bincookie_value(bincookie_cookie_t *cookie)` - Get the value of a cookie.\n\n`double bincookie_expiration_time(bincookie_cookie_t *cookie)` - Get the expiration time of a cookie\nas UNIX timestamp.\n\n`double bincookie_creation_time(bincookie_cookie_t *cookie)` - Get the creation time of a cookie as\na UNIX timestamp.\n\n`void bincookie_iter_state_init(bincookie_iter_state_t s)` - Use this to zero a\n`bincookie_iter_state_t` structure.\n\n## Flag enum\n\n```c\ntypedef enum {\n    secure,\n    http_only,\n} bincookie_flag;\n```\n\nThe value that stores whether or not a cookie is secure, HTTP-only, or any of these combinations is\na single 32-bit integer, with 0 or more values OR'd together (`0` is the default value). To test for\na particular property, such as HTTP-only, use the `\u0026` operator: `cookie-\u003eflags \u0026 http_only`.\n\n## Example use\n\n### Access all the cookie names in a file\n\n```c\nbincookie_t *bc = bincookie_init_path(\"Cookies.binarycookies\");\nunsigned int i, j;\nbincookie_page_t *page;\nbincookie_cookie_t *cookie;\nbincookie_iter_state_t state;\nunsigned int cookie_index = 0;\n\nbincookie_iter_state_init(state);\n\nwhile ((page = bincookie_iter_pages(bc, \u0026state)) != NULL) {\n    while ((cookie = bincookie_iter_cookies(page, \u0026cookie_index)) != NULL) {\n        printf(\"Name: %s\\n\", bincookie_name(cookie));\n    }\n    cookie_index = 0; // yes this is necessary\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftatsh%2Fbincookie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftatsh%2Fbincookie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftatsh%2Fbincookie/lists"}