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/bayvictor/logconfchat
A chat server in golang, which log all activities for convenience for later analytics, and with config file boost. LogConfChat architecture: -- A chatserver wich log allactivities for convenience for later analytics, and config file support in golang.
1. ArchitectureWhere
├── cmd_chat_client.go # Chat with vibriant GUI-like text consule UI
├── cmd_chat_server_7777.log # log for exec "cmd_chat_server" when running on port# 7777
├── cmd_chat_server.go #
├── config # persistence config like port#, when absent or error, using cmd os.Args[] default.
├── live_test.sh # minute-to-minute tweak script, test out all features.
├── pkg # when to "go get xxxx" external libraries put.
├── run_me_once.sh # init scripts, before any scripts run.
├── src #
├── test.results.log.txt # worksheets for development
└── write_config_file.go # which reveals how config structs
how to use:
## you can run multiple chatserver but on different port number.
./cmd_chat_server 2345 ## REPLACE 2345 with the actual port#, matching up-running server port you mean to ./cmd_chat_server 2346 ... ./cmd_chat_server ##which default to "5000" server init order: check confile file first, then os.Args[], if all missing or fail using default "5000" port.
connecting to right hostname, port#, with flexible initialization.
./cmd_chat_client localhost 2346 ##REPLACE 2345 with the actual port#, matching up-running server port you mean to connect ./cmd_chat_client some_where_over_the_rainbow 3456 ./cmd_chat_client remote_host 5678 ./cmd_chat_client ##which default to "localhost" "5000" The above server as it's name pointing out, can log all activities, can read/write config file using gonfig.
================================================================================
One of the client "victor" view, during "daniel" and "lambda" come and go!
┌─ messages: ───────────────────────────────────────────────┌─ 2 users: ───────┐
│[10:49:48] + daniel connected │victor │
│[10:49:55] daniel: i am the saint │victor │
│[10:50:02] daniel: daniel the one │ │
│[10:50:09] daniel: young winner. │ │
│[11:09:53] + victor connected │ │
│[11:09:54] victor: skdfjska │ │
│[11:09:55] victor: sdfksalk; │ │
│[11:09:57] victor: 12342143 │ │
│[11:09:59] victor: 34555566 │ │
│[11:10:00] victor: 445 │ │
│[11:10:02] victor: hello │ │
│[11:10:31] + lambda connected │ │
│[11:10:35] lambda: kaka │ │
│[11:10:37] lambda: yaya │ │
│[11:10:40] lambda: never! │ │
│[11:10:45] - lambda disconnected │ │
│[11:17:32] - daniel disconnected │ │
│ │ │
┌─ send: ───────────────────────────────────────────────────┐ │
│ │ │
│ │ │
│ │ │
└───────────────────────────────────────────────────────────┘──────────────────┘
cat victor.log
/================================================================== Client interface: full command line usage is "cmd_chat_client ", with argv[1],default is "cmd_chat_client localhost 5555".
=================================================================== Case: when multiple server starts in localhost, they log differently. filename: "os.Args[0]+"_"+os.Args[1]+".log", basically server-exec name+ portnumber which it running on.
=================================================================== manually check config file in "config/config.development.json", (because ENV default is development). change port to one never used before "5678", then go to batch test file run2.sh, change all command line port to "5678", find it read out and use ok. If remove "config/" dir then run, all fails because without configfile, server port default to 5000 without argument. found it behave correctly.
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.