diff options
author | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2019-08-23 13:53:01 +0200 |
---|---|---|
committer | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2019-08-23 13:53:01 +0200 |
commit | 7aacd77d42cbc3ec9fba37ac7f2f837701fcfa4d (patch) | |
tree | 573fe2efd5aeec46f4ba61f61e828e0117b854ef | |
parent | 9c6d5ee11c203a354bcc30e43f46bdb8a077f710 (diff) | |
download | termsend-7aacd77d42cbc3ec9fba37ac7f2f837701fcfa4d.tar.gz termsend-7aacd77d42cbc3ec9fba37ac7f2f837701fcfa4d.tar.bz2 termsend-7aacd77d42cbc3ec9fba37ac7f2f837701fcfa4d.zip |
replace 'kl' alias with 'ts'
no_ci
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
-rw-r--r-- | readme.md | 14 | ||||
-rw-r--r-- | termsend.1 | 8 | ||||
-rw-r--r-- | www/aliases.md | 24 |
3 files changed, 23 insertions, 23 deletions
@@ -53,17 +53,17 @@ tedious work. ```{.sh} # add this to your .bashrc or .zshrc or whatever shell you use -alias kl="socat - TCP:termsend.pl:1337" +alias ts="socat - TCP:termsend.pl:1337" ``` -Now you can upload anything by simply piping it to "kl" alias. Examples +Now you can upload anything by simply piping it to "ts" alias. Examples will explain it best: ``` -$ ls -l | kl # uploads list of files in current directory -$ cat error.log | kl # uploads file 'error.log' -$ make | kl # uploads compilation output -$ cat binary-file | kl # uploads some binary file +$ ls -l | ts # uploads list of files in current directory +$ cat error.log | ts # uploads file 'error.log' +$ make | ts # uploads compilation output +$ cat binary-file | ts # uploads some binary file ``` After transfer is complete, server will print link which you can later use to @@ -73,7 +73,7 @@ output is known to be big, **curl** output can be piped to **less**. Check out this simple example. ``` -$ make distcheck 2>&1 | kl +$ make distcheck 2>&1 | ts uploaded 3454 bytes uploaded 8203 bytes uploaded 9524 bytes @@ -227,17 +227,17 @@ Both key and self-signed certificate can be generated via .br .nf # create new 2048 bit long RSA key - openssl genrsa -out kl.key 2048 + openssl genrsa -out termsend.key 2048 # create self-signed certificate - openssl req -new -key kl.key -x509 -days 3650 -out kl.crt + openssl req -new -key termsend.key -x509 -days 3650 -out termsend.crt # key should be secret and unavailable to outer world - chmod 600 kl.key + chmod 600 termsend.key .fi .br .br Keep in mind, that users will have to have your -.B kl.crt +.B termsend.crt file in order to verify your server. Without that, user will not be sure if your server really belongs to you and will be suscible to man-in-the-middle attack. diff --git a/www/aliases.md b/www/aliases.md index 4d336b9..0113c50 100644 --- a/www/aliases.md +++ b/www/aliases.md @@ -9,9 +9,9 @@ it is advisible to create very simple to use alias. For aliases to work, data should be piped to them like this ```{.sh} -echo "test string" | kl -cat some-file | kl -program --that --outputs --data | kl +echo "test string" | ts +cat some-file | ts +program --that --outputs --data | ts ``` posix shell @@ -26,14 +26,14 @@ Send data over unencrypted socket using **socat** program. **socat** is cool program, as it sends **FIN** when **stdin** ends, so there is no need to append **termsend\n** at the end of transfer. ```{.sh} -alias kl="socat - TCP:termsend.pl:1337" +alias ts="socat - TCP:termsend.pl:1337" ``` Send data over encrypted socket using **socat** program, use this if you do not need to verify that you are really talking to **termsend.pl** server and not some man-in-the-middle. ```{.sh} -alias kls="socat - OPENSSL:termsend.pl:1339,verify=0" +alias tss="socat - OPENSSL:termsend.pl:1339,verify=0" ``` Send data over encrypted socket using **socat** program and verify that @@ -42,7 +42,7 @@ that you should treat all data sent to **termsend.pl** as public and this example is usefull when you self host **termsend** and want to have really secure socket. [termsend.crt can be downloaded here][1] ```{.sh} -alias kls="socat - OPENSSL:termsend.pl:1339,cafile=/usr/share/ca/kl.crt" +alias tss="socat - OPENSSL:termsend.pl:1339,cafile=/usr/share/ca/termsend.crt" ``` netcat @@ -59,13 +59,13 @@ Send data over unencrypted, timed socket. Note that after all data is sent, you will need to wait 3 seconds (or time configured on server) for server to notice timeout to receive link. ```{.sh} -alias kl="nc termsend.pl 1338" +alias ts="nc termsend.pl 1338" ``` Send data over unencrypted socket. This is workaround for **netcat** not sending **FIN** packet. This will work with every flavour of **netcat**. ```{.sh} -alias kl="{ cat -; echo 'termsend'; } | nc termsend.pl 1337" +alias ts="{ cat -; echo 'termsend'; } | nc termsend.pl 1337" ``` bash @@ -79,7 +79,7 @@ bash For when there is neither **socat** nor **nc** available, there almost always is **bash** present. ```{.bash} -alias kl="{ exec 5<>/dev/tcp/termsend.pl/1337; \ +alias ts="{ exec 5<>/dev/tcp/termsend.pl/1337; \ { cat - >&5; echo 'termsend' >&5; }; cat <&5; }" ``` @@ -87,12 +87,12 @@ alias examples ============== Different various aliases to make life easier. These assume that you already -have **kl** alias defined prior to these ones. +have **ts** alias defined prior to these ones. Upload and store link into clipboard ```{.bash} -alias klc="kl | tail -n1 | xclip" +alias tsc="ts | tail -n1 | xclip" ``` -[1]: https://termsend.pl/kl.crt +[1]: https://termsend.pl/termsend.crt |