aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2019-08-23 13:44:30 +0200
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2019-08-23 13:50:22 +0200
commitfbac35a851f21f9da87f60db8866ace466dfb820 (patch)
treee790b164d79c6bd3886f9ebc65f69b6354c31240
parent1856a2b038dd4a0119bf5ff4324d13b7a716c246 (diff)
downloadtermsend-fbac35a851f21f9da87f60db8866ace466dfb820.tar.gz
termsend-fbac35a851f21f9da87f60db8866ace466dfb820.tar.bz2
termsend-fbac35a851f21f9da87f60db8866ace466dfb820.zip
use termsend.pl site as demo site
no_ci Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
-rw-r--r--readme.md26
-rw-r--r--termsend.110
-rw-r--r--www/aliases.md30
3 files changed, 33 insertions, 33 deletions
diff --git a/readme.md b/readme.md
index 3eb98d5..f4b781f 100644
--- a/readme.md
+++ b/readme.md
@@ -17,11 +17,11 @@ Client
Clients don't need any sophisticated tools. To upload to server - pipe standard
output from any application to **socat**:
-Note: **kl.bofc.pl** is demo server which you can use to play with termsend.
+Note: **termsend.pl** is demo server which you can use to play with termsend.
You can also use it like ordinary no paste service to share data with people.
```
-$ echo "test string" | socat - TCP:kl.bofc.pl:1337"
+$ echo "test string" | socat - TCP:termsend.pl:1337
```
Server reads data until **FIN** is seen or string **termsend\n** at the very
@@ -31,7 +31,7 @@ version of **netcat**, you need to also append **termsend\n** at the very end
of transfer:
```
-$ echo "test string" | { cat -; echo 'termsend'; } | nc kl.bofc.pl 1337
+$ echo "test string" | { cat -; echo 'termsend'; } | nc termsend.pl 1337
```
If, for some reason, you are not able to pass **termsend\n**, you can always
@@ -42,7 +42,7 @@ the fact that you will have to wait 3 seconds after all data is sent, and you
might end up with incomplete upload when your output program stalls.
```
-$ echo "test string" | nc kl.bofc.pl 1338"
+$ echo "test string" | nc termsend.pl 1338
```
### easy to use alias
@@ -53,17 +53,17 @@ tedious work.
```{.sh}
# add this to your .bashrc or .zshrc or whatever shell you use
-alias kl="socat - TCP:kl.bofc.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
@@ -87,8 +87,8 @@ uploaded 40200 bytes
uploaded 1604104 bytes
uploaded 4668396 bytes
uploaded 4690455 bytes
-https://kl.bofc.pl/o/6p3e1
-$ curl https://kl.bofc.pl/o/6p3e1 | less
+https://termsend.pl/o/6p3e1
+$ curl https://termsend.pl/o/6p3e1 | less
```
In this example, we upload output of **make distcheck** program into server, and
diff --git a/termsend.1 b/termsend.1
index 28fde03..39d9cd2 100644
--- a/termsend.1
+++ b/termsend.1
@@ -86,7 +86,7 @@ This can be important, for example, when you want to upload output of
make.
.PP
.nf
- make | nc kl.bofc.pl 1338
+ make | nc termsend.pl 1338
.fi
.PP
In this situation when make does not output anything, which is not something
@@ -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 7067fd1..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,23 +26,23 @@ 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:kl.bofc.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 **kl.bofc.pl** server and 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:kl.bofc.pl:1339,verify=0"
+alias tss="socat - OPENSSL:termsend.pl:1339,verify=0"
```
Send data over encrypted socket using **socat** program and verify that
-**kl.bofc.pl** is really valid server and not man-in-the-middle. Note
-that you should treat all data sent to **kl.bofc.pl** as public and
+**termsend.pl** is really valid server and not man-in-the-middle. Note
+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:kl.bofc.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 kl.bofc.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 kl.bofc.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/kl.bofc.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://kl.bofc.pl/kl.crt
+[1]: https://termsend.pl/termsend.crt