Updated SocketClass to use API Graphs.

This commit is contained in:
Napalys
2025-04-04 08:41:47 +02:00
parent c7fad09664
commit e16a20e69f
6 changed files with 60 additions and 17 deletions

View File

@@ -0,0 +1,10 @@
import javascript
API::NewNode getAWebSocketInstance() { result instanceof ClientWebSocket::ClientSocket }
from DataFlow::Node handler
where
handler = getAWebSocketInstance().getReturn().getMember("onmessage").asSource()
or
handler = getAWebSocketInstance().getAPropertyWrite("onmessage").getRhs()
select handler, "This is a WebSocket onmessage handler."