Skip to content

On the origin of wsdump.py #2174

@rjpadilla

Description

@rjpadilla

Background

@dogi wanted a replacement of the wscat tool (a tool that connects to a gateway with WebSockets) to be used for the new Discord feature implementation #2155 . Since wscat requires a npm install, a luxury we can't afford, a replacement universally built-in is needed. Websocat, socat, and netcat were recommended but I found a better solution: wsdump.py.

wsdump.py module is located in the /usr/local/bin directory.

But the question is how did it get there.

Investigation

In order to use wsdump.py for the Discord feature, we have to be 100% certain that it is accessible from the start and does not require any superfluous installation. We've looked into debian/pip package manager and github history but found no success on the origin of wsdump.py

Solution

I figured that wsdump.py came from a package as a dependency but wasn't sure how until through my research, discoverd docker-compose has a connection to websockets.

wsdumporiginpackage

I tried to install docker-compose on my vanilla raspberry pi with pip but no success since it required the use of Python 3.....

I then successfully installed docker-compose with the use of pip3:

wsdumpinstallpip

Saw that it installed the websocket-client dependency package...

wsdumporiginwebsocket

And I found wsdump.py

wsdumpinstalled

Lesson learned

  • wsdump.py comes pre-installed with docker-compose
  • When working with Python, make sure to know which version your using (@dogi and I were looking in Python2.7 not Python3).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions