快速、简洁、加密的命令行粘贴工具
ultra fast, minimalistic, encrypted command line paste-bin
domain.tld/{day,week,month}domain.tld/domain.tld/0 for a paste with infinite life.https support for secure communication.man purrito.If these are not available in an OS's repositories, they can be manually installed by following the steps in the GitHub workflow
$ meson --prefix "/usr" -C build
$ ninja -C build
$ sudo ninja -C build install
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
Make sure that whatever link is provided to the -d domain option, is also able to serve the paste.html from this repository.
Define these functions somewhere in the dot files of the desired shell (they work on all POSIX compliant shells).
…
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.
Steps automatically done by the provided clients, on the client side:
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.
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.
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.
The services directory consists of OpenRC and SystemD service files.
They need the purritobin user and group to exist.
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.
uNetworking: for their uWebSockets and uSockets
暂无开放 Issues,或尚未同步最近议题。