{"id":18252115,"url":"https://github.com/ericonr/purr-c","last_synced_at":"2026-02-11T17:35:09.832Z","repository":{"id":56382378,"uuid":"295258901","full_name":"ericonr/purr-c","owner":"ericonr","description":"Pure C client for PurritoBin and other networking projects","archived":false,"fork":false,"pushed_at":"2025-01-13T19:12:21.000Z","size":150,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T21:26:15.785Z","etag":null,"topics":["bearssl","c","crypto","gemini","pastebin-client"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericonr.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":"2020-09-13T23:51:01.000Z","updated_at":"2024-06-30T09:28:22.000Z","dependencies_parsed_at":"2022-08-15T17:40:42.942Z","dependency_job_id":null,"html_url":"https://github.com/ericonr/purr-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ericonr/purr-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericonr%2Fpurr-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericonr%2Fpurr-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericonr%2Fpurr-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericonr%2Fpurr-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericonr","download_url":"https://codeload.github.com/ericonr/purr-c/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericonr%2Fpurr-c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29339693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T16:14:43.024Z","status":"ssl_error","status_checked_at":"2026-02-11T16:14:15.258Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["bearssl","c","crypto","gemini","pastebin-client"],"created_at":"2024-11-05T09:50:06.395Z","updated_at":"2026-02-11T17:35:09.816Z","avatar_url":"https://github.com/ericonr.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# purr-c\n\n![Tests](https://github.com/ericonr/purr-c/workflows/Tests/badge.svg?event=push)\n\nThis repository holds some loosely related networking projects. This is mainly a\nlearning exercise for network and TLS programming, with a dash of crypto, and\nall of the programs contained here should be treated as such.\n\nThe [BearSSL](https://www.bearssl.org/) library was chosen as the TLS and crypto\nimplementation.\n\nAll pieces of code should be either self explanatory or well commented. If you\nfind any part of the code lacking in those, feel free to open an issue.\n\n## Building\n\nThe only non-optional external dependency is the BearSSL library - on [Void\nLinux](https://voidlinux.org/), it can be obtained via the `bearssl-devel`\npackage.\n\nThis project can be built with two different build systems.\n\n### GNU Make\n\nGNU Make and a C99 compiler, such as [cproc](https://git.sr.ht/~mcf/cproc), are\nrequired for building.\n\nYou can build and install the project with the commands below:\n\n```\n$ ./configure # creates config.mk\n$ make\n$ make install PREFIX=$HOME/.local\n```\n\n### Meson\n\nAlternatively, you can use the Meson build system, which requires the Meson tool\nitself, Ninja, a C99 compiler that Meson knows about (GCC or Clang will do the\ntrick), and the `msgfmt` tool from GNU Gettext or a compatible implementation.\nNote that **only** the Meson builds support localization, and it isn't optional.\n\nYou can build and install the project with the commands below:\n\n```\n$ meson build --prefix $HOME/.local\n$ ninja -C build/\n$ ninja -C build/ install\n```\n\nInstead of using Ninja, you can use\n[samurai](https://github.com/michaelforney/samurai).\n\n## Programs\n\n### purr\n\nThis is a pure C client for the\n[PurritoBin](https://github.com/PurritoBin/PurritoBin) pastebin server, and uses\nPurritoBin's author's instance at \u003chttps://bsd.ac\u003e by default. It also supports\n[zdykstra's pastebin](https://github.com/zdykstra/pastebin).\n\nIt supports symmetric paste encryption (as supported by PurritoBin's online\ninterface and its [suggested\nclients](https://github.com/PurritoBin/PurritoBin/tree/master/clients)). This\nmakes it possible to share paste links that can only be decrypted by someone who\nhas the keys to them. The key and IV are stored in the url's hash property, and\nare never sent to the server.\n\nIt can also work as a very limited `curl` alternative, due to its support of\nboth HTTP and HTTPS. It can use `HTTP/1.0` or `HTTP/1.1` for requests, and\nalways requires the `Content-Length` field in the response header (no chunked\ntransfer here!) - this is done because I have found servers that don't send\n`notify_close` when their transmission is done, instead relying on the\n`Content-Length` field to provide enough information for the client to determine\nif the transmission was sucessful or if the connection was terminated before it\nshould have been.\n\nThis program uses `getentropy(3)` for key and IV generation.\n\n#### Usage\n\nUsage information can be viewed with `purr -h`. There are two symlinks to the\n`purr` executable, `meow` and `meowd`, which are used as shortcuts to send and\nreceive encrypted pastes, respectively.\n\n### gemi\n\nThis is a (not so dumb anymore) [Gemini](https://gemini.circumlunar.space/)\nclient. It doesn't support TOFU (Trust On First Use) yet, so it isn't fully\ncompliant with the Gemini spec, but it can talk to (almost) any server, not\nbeing limited to those whose certificates can be verified by the local trust\nanchors.\n\nIt has a built-in \"navigation\" mechanism via the `-b` command line flag, which\nparses the received page, finds links, asks the user to select one, and finally\nexecs into itself with the new link.\n\nIt can parse server responses with status headers, including redirects, and can\ndeal with \"complex\" links, such as `../../docs`. However, it doesn't pass the\ngemini browser torture test.\n\n#### Usage\n\nUsage information can be viewed with `gemi -h`.\n\n## Localization\n\nThe Meson build system has been added mainly due to its capabilities for dealing\nwith translation via [GNU gettext](https://www.gnu.org/software/gettext/).\nDocumentation for these features can be found in their [official\ndocs](https://mesonbuild.com/Localisation.html) and [module\nmanual](https://mesonbuild.com/i18n-module.html).\n\nFor reference, some useful commands:\n\n```\n$ ninja -C build/ purr-c-pot # generate pot file\n$ ninja -C build/ purr-c-update-po # update po files\n$ ninja -C build/ purr-c-gmo # builds translations without installing\n```\n\n### Contributing translations\n\nSimply add the locale name (usually in the form `ll` or `ll_CC`, where `ll`\nrefers to the language and `CC` to the country - see the [GNU Gettext manual\nsection on Locale\nNames](https://www.gnu.org/software/gettext/manual/html_node/Locale-Names.html))\nto the `po/LINGUAS` file and run the command for updating po files, shown above.\nAfter that, you will be ready to start working on the new `po/ll[_CC].po` file!\n\n## Acknowledgements\n\n- Thomas Pornin for [BearSSL](https://www.bearssl.org/)\n- Laurent Bercot for [s6-networking](http://skarnet.org/software/s6-networking/)\n   (even though it's no longer in use here)\n- epsilon-0 for [PurritoBin](https://github.com/PurritoBin/PurritoBin) (and the\n   valuable help while I was testing this program)\n- paolostivanin for\n   [libbaseencode](https://github.com/paolostivanin/libbaseencode) (also no\n   longer used here)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericonr%2Fpurr-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericonr%2Fpurr-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericonr%2Fpurr-c/lists"}