Server application to share files (or program output) from command line using the most basic UNIX tools, like netcat or socat.




Clients don't need any sophisticated tools. To upload to server - pipe standard output from any application to socat:

$ echo "test string" | socat - TCP:kl.kurwinet.pl:1337"

Server reads data until FIN is seen or string kurload\n at the very end of transfer. socat and nmap version of netcat send FIN when stdin ends so it is advisible to use them. If you are stuck with hobbit version of netcat, you need to also append kurload\n at the very end of transfer:

$ echo "test string" | { cat -; echo 'kurload'; } | nc kl.kurwinet.pl 1337"

If, for some reason, you are not able to pass kurload\n, you can always use timed upload. In this mode, server will read data until there is no activity on the socket for at least 3 seconds, after that kurload assumes transfer to be complete and link is returned. This is not recommended, due to 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.kurwinet.pl 1338"

easy to use alias

It's quite long and irritating to type these pipes everytime you want to upload something. It is recommended to create alias to work-around this tedious work.

# add this to your .bashrc or .zshrc or whatever shell you use
alias kl="socat - TCP:kl.kurwinet.pl:1337"

Now you can upload anything by simply piping it to "kl" 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

After transfer is complete, server will print link which you can later use to get uploaded content (like send it to someone via IRC). If uploaded content is a simple text file, you can read it directly in terminal using curl, or if output is known to be big, curl output can be piped to less. Check out this simple example.

$ make distcheck 2>&1 | kl
uploaded        400 bytes
uploaded        468 bytes
uploaded       1044 bytes
uploaded       1562 bytes
uploaded       3272 bytes
uploaded       4505 bytes
uploaded       4639 bytes
uploaded      10120 bytes
uploaded      10297 bytes
uploaded      10432 bytes
uploaded      12975 bytes
uploaded      62261 bytes
uploaded      69904 bytes
uploaded      71297 bytes
upload complete, link to file https://kl.kurwinet.pl/e7wcz
$ curl https://kl.kurwinet.pl/e7wcz | less

In this example, we upload output of make distcheck program into server, and later we read in in less (for example on another computer).

Server will notify uploader about how much bytes were transfered every second. If information is not received for longer than 1 second, that means program did not produce any output and server didn't receive any data.

For all aliases check alias page.


Information about server usage and its options can be found in man page kurload(1).

Test results

Newest kurload is tested against these operating systems and architectures. Note that test results are taken from master branch, release version always passes all these tests.

operating system tests

  • parisc-polarhome-hpux-11.11 test-result-svg
  • power4-polarhome-aix-7.1 test-result-svg
  • i686-builder-freebsd-11.1 test-result-svg
  • i686-builder-netbsd-8.0 test-result-svg
  • i686-builder-openbsd-6.2 test-result-svg
  • x86_64-builder-dragonfly-5.0 test-result-svg
  • x86_64-builder-solaris-11.3 test-result-svg
  • i686-builder-linux-gnu-4.9 test-result-svg
  • i686-builder-linux-musl-4.9 test-result-svg
  • i686-builder-linux-uclibc-4.9 test-result-svg
  • x86_64-builder-linux-gnu-4.9 test-result-svg
  • x86_64-builder-linux-musl-4.9 test-result-svg
  • x86_64-builder-linux-uclibc-4.9 test-result-svg
  • i686-builder-qnx-6.4.0 test-result-svg

machine tests

  • aarch64-builder-linux-gnu test-result-svg
  • armv5te926-builder-linux-gnueabihf test-result-svg
  • armv6j1136-builder-linux-gnueabihf test-result-svg
  • armv7a15-builder-linux-gnueabihf test-result-svg
  • armv7a9-builder-linux-gnueabihf test-result-svg
  • mips-builder-linux-gnu test-result-svg


  • -fsanitize=address test-result-svg
  • -fsanitize=leak test-result-svg
  • -fsanitize=undefined test-result-svg
  • -fsanitize=thread test-result-svg


Compile and install

Program uses autotools so instalation is as easy as

$ ./autogen.sh
$ ./configure
$ make
# make install


Program is licensed under BSD 2-clause license. See LICENSE file for details.


Michał Łyszczek michal.lyszczek@bofc.pl

See also

  • embedlog easy to use but feature-rich logger for c/c++ applications
  • mtest macro unit test framework for c/c++
  • git repository to browse sources online
  • continous integration with test results
  • polarhome nearly free shell accounts for virtually any unix there is.
  • pvs studio static code analyzer with free licenses for open source projects