{"id":16375754,"url":"https://github.com/scarsz/bin","last_synced_at":"2025-03-23T03:32:44.054Z","repository":{"id":56611204,"uuid":"185278458","full_name":"Scarsz/Bin","owner":"Scarsz","description":"AES 128/256-bit encrypted, GitHub Gists-inspired, anonymous pastebin","archived":false,"fork":false,"pushed_at":"2020-11-21T01:20:06.000Z","size":116,"stargazers_count":15,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T17:14:01.296Z","etag":null,"topics":["aes","anonymous","encryption","gist","hacktoberfest","pastebin","self-hosted"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Scarsz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-06T22:07:08.000Z","updated_at":"2025-02-27T04:47:26.000Z","dependencies_parsed_at":"2022-08-15T21:50:54.068Z","dependency_job_id":null,"html_url":"https://github.com/Scarsz/Bin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scarsz%2FBin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scarsz%2FBin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scarsz%2FBin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scarsz%2FBin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scarsz","download_url":"https://codeload.github.com/Scarsz/Bin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052633,"owners_count":20553162,"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":["aes","anonymous","encryption","gist","hacktoberfest","pastebin","self-hosted"],"created_at":"2024-10-11T03:22:03.028Z","updated_at":"2025-03-23T03:32:43.463Z","avatar_url":"https://github.com/Scarsz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bin\nBin is an AES 128/256-bit encrypted, GitHub Gists-inspired, anonymous\npastebin. All data on the server is encrypted such that the operators\nof the server have no knowledge of what data is stored on it. This\ntool was designed to be a replacement for my old debug information\nserver that [DiscordSRV](https://github.com/DiscordSRV/DiscordSRV)\nuses. The problem with the old system was that while I am by no means\na malicious actor, it raises a security concern that I was in\npossession of lots of debug information from the plugin and the\nservers using it, all in plain text. I don't really like that and\nI don't think it's fair to server owners either thus Bin was made.\n\n# How it works\nWhen DiscordSRV or any other client uploads to Bin, it uploads the\ndata after it's already been encrypted. The client just sends the\nencrypted data, without the key. It's the client's responsibility\nto make sure the encrypted data is able to be decrypted properly\nas the server has no way of knowing the contents of anything on it.\nWhen data is uploaded, the server gives back the bin UUID- the view\nURL is in the format `https://host/UUID#KEY`.\n\n#### Notice how the key is after a `#`.\nThis is how you're able to have a URL that includes the decryption\nkey without exposing the key to the server. Browsers don't send\nanything after `#` in URLs because that information is only really\nused for telling the browser to show a given element on the page.\nThe cool part about that though is that the browser's JavaScript\nengine has access to this data and thus the decryption key. This lets\nthe browser fetch the encrypted data from the server and decrypt it\nitself.\n\n# Developers\nBin exposes a few endpoints that're useful if you're making a client.\n**Be sure to set a proper user agent.**\n```\nGET /UUID.(json|xml) -\u003e /api/UUID.(json|xml)\nGET /api/UUID.(json|xml) -\u003e /[latest API]/UUID.(json|xml)\nGET /v1/UUID.(json|xml) -\u003e JSON or XML dump of the bin data\n\nPOST /post\n{\n    // when generating the 16 or 32-byte key, only use alphanumeric characters\n    // you can technically use whatever bytes you want in the key but that will restrict the bin to custom clients only\n    // when encrypting data, it should be in the format \"initializationVector[0-15]encryptedData[16...]\"\n    // in other words, the \"encrypted data\" should be the IV plus the actual encrypted data\n    // and please- do not use the same IV for every encryption. it should be randomly generated for every encryption.\n\n    \"description\": base64(aes(\"optional bin description\")),\n    \"expiration\": -43200, // optional expiration in minutes; negative number = minutes since creation,\n                          //                                 positive number = minutes since last access\n    \"files\": [\n        {\n            \"name\": base64(aes(\"file-name.txt\")),\n            \"content\": base64(aes(\"file content\")),\n            \"description\": base64(aes(\"optional file description\")),\n            \"type\": base64(aes(\"MIME type- if not defined, view page defaults to application/octet-stream\"))\n        },\n        ...\n    ]\n}\n```\n\n# Contributing\nI'm not the best at front end design. If you want to add some visual\nimprovements to Bin's UI, feel free to make a pull request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscarsz%2Fbin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscarsz%2Fbin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscarsz%2Fbin/lists"}