All systems administrators are well familiar with the concatenation tool ‘cat’, and some also know of the variants such as ‘tac’, ’supercat’ and even the improved cat – ‘dog’. A few more or less useful listing of concatenation tools:
cat - the basic concatenation tool. supercat - Introduces coloring and can be used for syntax highlighting. tac - reverse cat. dog - improved cat. Can fetch the newspaper (http streams) hungrycat - Removes bytes as it concatenates leaving the file empty once completed. ncat - Network cat. A versatile network utility. irccat - concatenates and displays file contents on a IRC channel barcat - Not really a concatenation tool. Produces progress bar in a *NIX shell. cryptcat - A lightweight encrypted variant of netcat. safecat - A "safe" variant of cat which does return codes correctly. socat - Socket concatenation. A versatile utility handling sockets. Thanks to Christian Bryn.
And then there’s zcat and bzcat for concatenating compressed files.
Note that ‘dog’ also escapes binary by default which can be nice when handling data in stdout, but will cause errors when concatenating binary files into files, sockets or alike. On the other hand, ‘cat’ will not escape leaving the terminal exposed. This has been exploited in several situations where a systems administrator would concatenate a log file containing malicious requests. When concatenating this to stdout, depending on your terminal, code can be executed.
If anyone knows about any other ‘cat’-like tools, please tell me.
SO YOU THINK YOU CAN CAT?
socat!
…so here’s a ‘multicat’ example:
socat STDIO UDP4-DATAGRAM:224.1.0.1:6666,bind=:6666,range=10.0.0.0/24,ip-add-membership=224.1.0.1:10.0.0.15,ip-multicast-loop=0
10.0.0.15 = your (multicast server/peer) IP
10.0.0.0/24 = yournet
…this way you can multi-lol (or even rofl) to everyone in your net!
How could I forget lovely socat? Terribly sorry, and thanks for your input
I found a tool ‘multicat’ as well:
“The multicat package contains a set of tools designed to easily and
efficiently manipulate multicast streams in general, and MPEG-2
Transport Streams (ISO/IEC 13818-1) in particular.”
http://download.videolan.org/pub/videolan/multicat/1.0/
boya!