
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@unrest/random
Advanced tools
a pseudo random number generator that spawns other pseudo random number generators
ur-random
This is a pseudo random number generator (PRNG) with a second stream of randomness for avoiding "the butterfly effect". Checkout the gh-page for more details:
https://chriscauley.github.io/ur-random/
npm install ur-random
import Random from 'ur-random'
const random = Random(1234)
random() // returns a float between 0 and 1, just like Math.random()
random()
- A float [0,0.999...]
random.int()
- An int [0,2147483646]
random.int(10)
- I'm thinking of a number between 0 and 9
random.int(1,11)
- I'm thinking of a number between 1 and 10
random.choice(["heads","tails"])
- Flip a coin!
random.shuffle(range(5))
- Shuffled array, [0-4]
random.reset()
- Reset the PRNG
random()
- Same float as the first row
FAQs
a pseudo random number generator that spawns other pseudo random number generators
The npm package @unrest/random receives a total of 0 weekly downloads. As such, @unrest/random popularity was classified as not popular.
We found that @unrest/random demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.