Recently, I released a paste server named termbin.co, It is inspired by termbin.com. It aims to paste file var command line.
For Example, I want to paste a log file form a linux server behind firewall.
➜ ~ cat test.log | nc termbin.co 9999 https://termbin.co/3h2e
And it also support common binary file. For Example:
➜ ~ cat simple_jpg.jpg | nc termbin.co 9999 https://termbin.co/t4OZ/index.jpg
because termbin.co is based on socket, No filename send to server. So server guess filetype from binary file. I use https://github.com/h2non/filetype do this job.
But there is two problem, the first issocket connection not robust. termbin.co server is host at NewYork, Some paste from china could get failure. Another is for guess filetype I must put all binary file in memory. Which could cause memory leak problem. To avoid this, I set a file size limit(current as 4MB) to
Today I found another awesome project named wsend. It is based on http, which is more stable. Example:
wget https://wsend.net/wsend chmod +x wsend ./wsend file.txt wget https://wsend.net/wsen
wsend.net didn’t open the server code. So I considered how can I trust wsend.net. Will the admin steal my file or share my file to others? And I found wsend support gpg encrypt, this repo named wsend-gpg, It allows me post a file after encrypted. Example:
➜ wsend-gpg git:(master) ✗ ./wsend-gpg README.md gpg: gpg-agent is not available in this session info: info: It appears you aren't registered info: Registration is free and comes with 2GB of storage space info: Plus get 1G of space for every friend you refer info: info: Sign up now with: wsend --register info: info: unregistered accounts are limited to 200MB info: your unregistered transfer will now continue info: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4409 100 64 100 4345 303 20583 --:--:-- --:--:-- --:--:-- 20592 https://wsend.net/3684b2e672640690d9bc50b09a72eb34/README.md.gpg
get the gpg file and decrypt
➜ wsend-gpg git:(master) ✗ ./wget-gpg https://wsend.net/3684b2e672640690d9bc50b09a72eb34/README.md.gpg --2018-05-23 14:15:43-- https://wsend.net/3684b2e672640690d9bc50b09a72eb34/README.md.gpg Resolving wsend.net (wsend.net)... 188.8.131.52 Connecting to wsend.net (wsend.net)|184.108.40.206|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 4010 (3.9K) [application/octet-stream] Saving to: ‘README.md.gpg’ README.md.gpg 100%[================================================================================================================>] 3.92K --.-KB/s in 0.002s 2018-05-23 14:15:43 (1.87 MB/s) - ‘README.md.gpg’ saved [4010/4010] gpg: AES256 encrypted data gpg: gpg-agent is not available in this session gpg: encrypted with 1 passphrase File `README.md' exists. Overwrite? (y/N) N Enter new filename: Helloworld.md
It is awesome, I like it very much!
And very welcome to use my termbin.co, termbin.co only need netcat installed.(which is install as default in ubuntu and macos.)