百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

PurritoBin

> DevOps
开源

快速、简洁、加密的命令行粘贴工具

194 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

快速、简洁、加密的命令行粘贴工具

Purrito Bin (=♡ᆺ♡=)

ultra fast, minimalistic, encrypted command line paste-bin

Features and Highlights

  • Very lightweight: 2-3 MB of RAM on average.
  • Listen on multiple address/port combinations, both IPv4 and IPv6.
  • Configurable paste size limit.
  • Auto-cleaning of pastes, with configurable paste lifetime at submission time:
    • domain.tld/{day,week,month}
    • domain.tld/
    • domain.tld/0 for a paste with infinite life.
  • Paste storage in plain text, easy to integrate with all web servers (Apache, Nginx, etc.).
  • Encrypted pasting similar to PrivateBin.
  • Optional https support for secure communication.
  • Tiny code base, less than 1000 lines of code, for very easy auditing.
  • Well documented, man purrito.

Manual setup (ฅ^・ﻌ・^)ฅ

Requirements

  • uSockets
  • uWebSockets
  • lmdbxx

If these are not available in an OS's repositories, they can be manually installed by following the steps in the GitHub workflow

Compilation

$ meson --prefix "/usr" -C build
$ ninja -C build
$ sudo ninja -C build install

Usage

The server is run using the command purrito. To quickly view the available options:

$ purrito -h
usage: purrito [-abcdefghijklmnpqrstvwxz] -d domain [-a slug_characters]
               [-b max_database_size] [-c public_cert_file] [-e dhparams_file]
               [-f index_file] [-g slug_size] [-h] [-i bind_ip]
               [-j autoclean_interval] [-k private_key_file] [-l]
               [-m max_paste_size] [-n server name] [-p bind_port]
               [-q default_time_limit] [-r max_retries] [-s storage_directory]
               [-t] [-v header_value] [-w passphrase] [-x header]
               [-z database_directory]

For an indepth explanation, there is a man page provided.

$ man purrito

Running the encrypted PurritoBin

Make sure that whatever link is provided to the -d domain option, is also able to serve the paste.html from this repository.

Client (=`ﻌ´=)

Shell client definitions

Define these functions somewhere in the dot files of the desired shell (they work on all POSIX compliant shells).

…

Encrypted Storage Clients (=`ᆺ├┬┴┬┴

In a encrypted storage setting, the paste is encrypted before sending it to the server. Now the server will only be used as a storage bin and even in case of a non-https connection, it is guaranteed that no one else will be able to read the data that was sent.

How does it work?

Steps automatically done by the provided clients, on the client side:

  • Randomly generate an ecryption key and initialization vector iv.
  • Encrypt the data using said key and iv, the encrypted data is called the cipher.
  • Send the cipher to the pastebin and get a standard paste url as above, which will be converted to the form
   https://bsd.ac/paste.html#pasteID_key_iv

The standard client is meow, a companion to the above purr, which is also POSIX compliant and should work in all shells. It has exactly the same usage as purr, so please look at those examples to see how to use it. The only dependency on the client side is the presence of LibreSSL or OpenSSL, to do the encryption.

There will be other clients in the clients folder, added on demand for other platforms, which will do all this automatically. Pull requests for other clients are highly welcome.

Why is this secure?

  • All the encryption is done on the client side.
  • Only the cipher is sent to PurritoBin.
  • The url only contains the encrypted cipher and has no knowledge of the actual data.
  • When visiting the html webpage the key is in the hash property of the webpage, which is never sent to the server.
  • All decryption is done inside the browser, using javascript, Crypto JS on the client side.

NOTE: Anyone who has the full link is going to be able to read the decrypted text. Only send the full hash included url to trusted parties, through a secure communication channel.

Design principles

The aim is to follow the KISS philosophy and only aim to do one thing. There are tools which manage to do the other things better, so make the current one as integrable as possible.

Purrito Bin is very, very easily integrated into any setup. It runs as an unprivileged user in a single directory without access to any other systems resource.

In OpenBSD, it is automatically pledges and unveils the bare minimum to function, so even in the case of a bug in the code, an attacker has no access to the system.

Pull requests to harden the code by default in linux and other operating systems are highly welcome.

Extras

System services

The services directory consists of OpenRC and SystemD service files. They need the purritobin user and group to exist.

Pure C client

ericonr has made a very nice C client, which also supports encrypted pastes - https://github.com/ericonr/purr-c It uses BearSSL and is very instructive for all who wish to get a small example of using SSL in C together with networking.

Credits

uNetworking: for their uWebSockets and uSockets

brix: for their crypto-js

solusipse: for their fiche pastebin

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++dockerencrypted-storage-clientsopenbsdpastebin

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理