
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
github.com/kchristidis/cmap
A thread-safe capacity-constrained hash table that evicts key/value pairs according to the LRU (least recently used) policy. It is technically a thin wrapper around Go's built-in map type.
package main
import (
cmap "github.com/kchristidis/cmap
)
func main() {
cm, err := cmap.New(2) // will hold up to 2 key/value pairs
if err != nil {
log.Fatal(err)
}
cm.Put("fooKey", "fooVal")
v, ok := cm.Get("fooKey") // retrieve the value
fmt.Println(ok)
fmt.Println(v)
cm.Put("barKey", "barVal") // retrieve value as above
cm.Put("bazKey", "bazVal") // at this point "fooKey" is evicted
_, ok = cm.Get("fooKey")
fmt.Println(ok) // expected output: false
}
You may also want to consult the package documentation in GoDoc.
Contributions are welcome. Fork this library and submit a pull request.
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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.