Join GitHub today
Websocket functionality support #1388
I wanted to ask if there are any methods to work with websockets (send and receive messages) through NSE script? Does NMAP have some NSE Libraries or maybe some other solutions to work with websockets?
In my case, I want to send and receive some messages from websocket by using custom NSE script during host scan, but at this moment I can't find such methods or solutions to do this - I have the opportunity to only pass the handshake stage with hardcoded parameters (such as Sec-WebSocket-Key).
For example, I try to scan socket.io resource to find version of product, websocket location is:
And sending message is:
When I use Echo Test from https://www.websocket.org/echo.html or Python implementation based on websocket-client it works as expected - i got answer message:
Which contains all information that i need, but when I use NSE script, after handshake I got only first starting messages from websocket which looks like:
But after that nothing is working, even if I send something or not - looks like disconnection or something like this.