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/GulDmitry/php-websocket-server
Based on php-websocket by Nico Kaiser
Used websocket protocol 10 or higher.
If you want more powerful server see: Jeff Morgan websocket server, also you can look in the direction of the this server, especially for php client implementation. :-)
##Changes
####Connection object.
Send\broadcast to all server, application and group connections.
/**
* Send to current socket
*
* @param string $data
*/
public function send($data)
/**
* Send to all server sockets
*
* @param string $message
*/
public function sendServer($message)
/**
* Broadcats to all server sockets
*
* @param string $message
*/
public function broadcastServer($message)
/**
* Custom counter increment
*
* @param int $num
*/
public function incrementMsgStack($num)
/**
* Custom counter decrement
*
* @param int $num
*/
public function decrementMsgStack($num)
/**
* Reset counter
*/
public function resetMsgStack()
/**
* Socket standing
*
* @return bool TRUE if socket open, else FALSE
*/
public function getSocketAlive()
/**
* Send to current connection group if $key = false
*
* @param mixed $key Group identifier
* @param string $message
*/
public function sendGroup($message, $key = false)
/**
* Broadcast to current connection group if $key = false
*
* @param mixed $key Group identifier
* @param string $message
*/
public function broadcastGroup($message, $key = false)
/**
*
* @param mixed $key
* @param Connection $connection
*/
public function setGroup($key)
/**
* @param mixed $key
* @return mixe Connections in group with $key, or false if group not exists
*/
public function getConnectionsByGroupKey($key)
/**
* Get current socket group key
*
* @return mixed Group key or false
*/
public function getGroup()
/**
* Send to application sockets
*
* @param string $message
*/
public function sendApp($message)
/**
* Send to application sockets with exclude
*
* @param Connection $excludeConnection
* @param string $message
*/
public function broadcastApp($excludeConnection, $message)
1. Register application(s) (server.php)
2. Start server: php server.php
Run server script as root (and port 843(!)). If you want custom user or port run other script
that listens on port 843 and returns a Socket Policy XML string for Flash players.
(See http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_04.html for details.)
2. Connect to applicaton: run client/index.html in browser
See client/index.html
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.