Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On the origin of wsdump.py #2174

Closed
rjpadilla opened this issue Apr 9, 2021 · 0 comments
Closed

On the origin of wsdump.py #2174

rjpadilla opened this issue Apr 9, 2021 · 0 comments
Labels

Comments

@rjpadilla
Copy link
Member

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant