Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/sandertv/mcwss
A documentation and implementation of the Minecraft Bedrock Edition websocket protocol.
Minecraft has websocket connection commands that may be used to connect to a websocket server. These commands are /connect
and /wsserver
.
Both these commands have the same effect. Once connected to a websocket, the connection will last until the server closes it or until the
player completely exits the game. The connection will last when a player merely leaves a world, and will thus last when joining a server.
Websockets in Minecraft can be used for simple command communication between a player and a server. Additionally, the server can choose to
listen for certain events sent by the client and act upon receiving them.
In order to be able to execute the /connect
and /wsserver
commands, cheats must be enabled. This means that connecting on third party
servers is not possible, and only on the dedicated server when cheats are enabled. It is possible to connect on a singleplayer world and
join a server after that, but commands executed by the websocket server will not work. Events will still be sent by the client however.
In the settings tab, there is also a setting that enables/disables encrypted websockets. mcwss implements encryption between websockets, so changing this setting will not have an effect on the behaviour of mcwss.
mcwss is a Go library. To use it, Go must be installed. The library may be downloaded using go get github.com/Sandertv/mcwss
.
package main
import (
"github.com/sandertv/mcwss"
)
func main() {
// Create a new server using the default configuration. To use specific configuration, pass a *wss.Config{} in here.
server := mcwss.NewServer(nil)
server.OnConnection(func(player *mcwss.Player){
// Called when a player connects to the server.
})
server.OnDisconnection(func(player *mcwss.Player){
// Called when a player disconnects from the server.
})
// Run the server. (blocking)
server.Run()
}
The server may now be connected to by joining a singleplayer game and executing the command /connect localhost:8000/ws
.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.