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/arieshout/websocket-bench
Inspired from https://github.com/ArchangelSDY/Sigbench .
go build -tags forceposix github.com/ArieShout/websocket-bench
Agent
websocket-bench
Master interactive mode
websocket-bench -m master -a <agent-hosts> -s <websocket-server> -t signalr:json:echo
(You can find the supported topics from SubjectMap
in agent/controller.go)
The master starts a REPL environment where you can send commands interactively:
c <connection> [connection_per_second]
Ensure we have the target number of connections to the server. This can be used to increase the connection number if the current number of established connections are lower than the target number, or decrease the connections if greater.
s <senders> [interval]
Set the number of the senders which will send a message to the server every [interval]
(default 1000
) milliseconds.
Run s 0
to stop sending messages.
r
Instantly get the current benchmark statistics data in raw format.
v
Get the benchmark statistics of the next 10 seconds in CSV format. It's performed in the following way:
Clear message
)Master batch command mode
Batch mode is to support running this benchmark in a script. All the commands you want to run are written to a file. Every line only has one command. Some commands are specially for this mode:
wr
"Watch Result" (wr) dumps the latency numbers as well as connection statistic on master node.
w <second>
"Wait" command tells the master node to stop the test after the specified duration. It is useful if you want to stop your test gracefully after a fixed time duration.
wc <second>
"Wait and Countine " is an extension of "wait" command. It does not stop the test after the specified duration.
cm
"Clear Message" wants to clean all the history latency statistics. It does not remove the connections statistic.
./websocket-bench -m master -a "localhost:7000" -s "172.17.8.4:5050" -t signalr:json:echo -c json-echo-cmds.txt -o signalr_json_echo
Here is the command list of json-echo-cmds.txt:
c 16000
s 15000
wr
wc 60
cm
w 360
Send message to 15000 clients after 16000 connections were established. Watch the result on the master node.
Clean all latency statistic after 60 seconds, then collect new statistics for 360 seconds and stop.
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.