How To Install websocketd on Kali Linux

In this tutorial we learn how to install websocketd on Kali Linux. websocketd is Turn any program that uses STDIN/STDOUT into a WebSocket server

Introduction

In this tutorial we learn how to install websocketd on Kali Linux.

What is websocketd

websocketd is:

websocketd is a small command-line tool that will wrap an existing command-line interface program, and allow it to be accessed via a WebSocket.

WebSocket-capable applications can now be built very easily. As long as you can write an executable program that reads STDIN and writes to STDOUT, you can build a WebSocket server. Do it in Python, Ruby, Perl, Bash, C, Go, PHP, Java, Clojure, Scala, Groovy, Expect, Awk, VBScript, Haskell, Lua, R, whatever! No networking libraries necessary.

websocketd will start a WebSocket server on a specified port, and listen for connections.

Upon a connection, it will fork the appropriate process, and disconnect the process when the WebSocket connection closes (and vice-versa).

Any message sent from the WebSocket client will be piped to the process’s STDIN stream, followed by a \n newline.

There are three methods to install websocketd on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install websocketd Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install websocketd using apt-get by running the following command:

sudo apt-get -y install websocketd

Install websocketd Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install websocketd using apt by running the following command:

sudo apt -y install websocketd

Install websocketd Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install websocketd using aptitude by running the following command:

sudo aptitude -y install websocketd

How To Uninstall websocketd on Kali Linux

To uninstall only the websocketd package we can use the following command:

sudo apt-get remove websocketd

Uninstall websocketd And Its Dependencies

To uninstall websocketd and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove websocketd

Remove websocketd Configurations and Data

To remove websocketd configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge websocketd

Remove websocketd configuration, data, and all of its dependencies

We can use the following command to remove websocketd configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge websocketd

Dependencies

websocketd have the following dependencies:

References

Summary

In this tutorial we learn how to install websocketd package on Kali Linux using different package management tools: apt, apt-get and aptitude.