
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
github.com/nursik/go-expire-map
package main
import (
"fmt"
"github.com/nursik/go-expire-map"
"time"
)
func main() {
expireMap := expiremap.New()
// You must call Close(), when you do not need the map anymore
defer expireMap.Close()
// GMT Wednesday, 1 January 2025, 0:00:00
far := time.Unix(1735689600, 0)
ttl := far.Sub(time.Now())
// Insert
expireMap.Set(1, 1, ttl)
// Get value
v, ok := expireMap.Get(1)
fmt.Println(v, ok)
// Output 1 true
// Get TTL
v = expireMap.GetTTL(1)
// The output is equal to ~ ttl
fmt.Println(v)
// Update TTL
v, ok = expireMap.SetTTL(1, time.Second)
fmt.Println(v, ok)
// Output 1 true
time.Sleep(time.Second + time.Millisecond)
// Because key is already expired, it returns nil, false
v, ok = expireMap.SetTTL(1, ttl)
fmt.Println(v, ok)
// Output nil false
// Because key is already expired, it returns nil, false
v, ok = expireMap.Get(1)
fmt.Println(v, ok)
// Output nil false
}
comparable
keys and interface
valuesFAQs
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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.