About

termsend.pl is a service which allows you to share output of any terminal program (like cat, echo, make, gcc etc.) using just the most basic unix tools.

Usage

socat

$ echo "hello world" | socat - TCP:termsend.pl:1337
https://termsend.pl/o/gin9b
$ curl https://termsend.pl/o/gin9b
hello world

netcat

Due to the fact that not all implementations of netcat send FIN at the end of transfer, command is a little bit longer as it is required to add ending string so server can know when to finish transfer.

$ echo 'hello world' | { cat -; echo 'termsend'; } | nc termsend.pl 1337
https://termsend.pl/o/x0nhy
$ curl https://termsend.pl/o/x0nhy
another hello world

Aliases

To make your life easier and to live up to the promise that you can upload data with only 3 additional keypresses, you can create shell alias. Remember to replace ~/.bashrc with file that your shell will read. For zsh it will be ~/.zshrc, for dash - ~/.profile.

$ echo 'alias ts="socat - TCP:termsend.pl:1337"' >> ~/.bashrc
$ source .bashrc

Now you can upload anything with just 3 more keystrokes adding |ts

$ echo "easy send"|ts
https://termsend.pl/o/wa84m
$ curl  https://termsend.pl/o/wa84m
easy send

Examples

For big files it may be advisible to pipe curl output to less

$ cat server.c|ts
https://termsend.pl/o/80f49
$ curl https://termsend.pl/o/80f49 | less

You can also share any binary files - in this example we share an jpg image.

$ cat image.jpg|ts
https://termsend.pl/o/8lah1
$ curl https://termsend.pl/o/8lah1 > image-downloaded.jpg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 23694  100 23694    0     0   398k      0 --:--:-- --:--:-- --:--:--  398k
$ nomacs image-downloaded.jpg

Upload error log from gcc and file content in question.

$ gcc main.c 2>&1 | { cat -; printf '\n-----\nmain.c\n-----\n'; cat main.c; }|ts
https://termsend.pl/o/3wgr6
$ curl https://termsend.pl/o/3wgr6

Upload clipboard contents

# upload contents from mouse selection
$ xclip -o | ts
# upload contents from doing explicit copy (ctrl+c)
$ xclip -o -selection clipboard | ts

alias examples

Different various aliases to make life easier. These assume that you already have ts alias defined prior to these ones.

Upload and store link into clipboard

alias tsc="ts | tail -n1 | xclip"

In case when you want to send data but also see command output, you can use tee.

$ alias tst="tee /dev/tty | ts"
$ head -n4 configure.ac | tst
AC_INIT([termsend], [1.1.0], [michal.lyszczek@bofc.pl])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_HEADERS([termsend.h])
https://termsend.pl/o/f4qh9

termsend

This project is possible thanks to termsend server. With termsend you can self host your own pastebin server with optional ssl if you want to share confidential data.

Legal, terms and log policy

Please, do not send anything illegal, such content will be removed immediately, your IP banned and logs sent to the police. You are taking responsibility for anything that you upload.

termsend logs your IP address, date of action and link to uploaded file, which can and will be used against you if you send anything illegal.

By using this service, you agree to these terms.

Contact

For contact and bug reports, please write to michal.lyszczek@bofc.pl