Most netcat examples are with regular sockets, however, this utility can be used to act as a client or server for unix domain sockets by using the -U option:

nc -U ./socketfile    # act as a client
nc -l -U ./socketfile # act as a server (-l for listener)

In this example, socketfile is the filename for the socket. It appears in the file system but has a permission starting with ā€˜sā€™, e.g.. srwxrwxrwx Note: this should not be confused with fifos which appear with permissions starting with ā€˜pā€™, prwxrwxrwx.

These commands worked when played opposite these python client and server examples.

Question: can netcat passively monitor a socket connection to print out any bidirectional traffic to STDOUT?