Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
_____ _____ _____ _____ _
| _ | | __| __ |___ ___ _| |___ _____
| __| --| | | -| .'| | . | . | |
|__| |_____|_____|__|__|__,|_|_|___|___|_|_|_|
Ruby wrappers for the PCGRandom family of random number generators.
libpcg_random
gem install pcg_random
You can also configure the path to libpcg_random
by specifying it's path explicitly:
# specify the custome include path
gem install pcg_random --with-pcg_random-include=directory/containing/pcg_variants.h
# or, specify the custom path to the libpcg_random binary
gem install pcg_random --with-pcg_random-lib=directory/containing/libpcg_random.a
# Or, specify both the lib/ and include/ together to be under path/to/some/directory
gem install pcg_random --with-pcg_random-dir=path/to/some/directory
TODO: Create a CONTRIBTING.md
Install pcg_random from source using the above steps. Using the above links are important because the library must be compiled with additional flags to be used for gem-development. There are also some issues in the original repository that are addressed in my fork.
Either jump into your REPL of choice:
~$ irb
2.3.0 :001 > require 'pcg_random'
=> true
Or go ahead and try the API, it's built to be as close to Kernel::Random
as possible!
2.3.0 :002 > seed = PCGRanom.new_seed
=> 315431527813695542666700950080169144774
2.3.0 :003 > rng = PCGRanom.new 1234
=> #<PCGRandom:0x00000001bf3eb0 @seed=1234>
For detailed instructions, keep checking this repo, I'm working on getting a wiki up.
Benchmark of Random.new_seed vs PCGRandom.new_seed
==================================================
Benchmark created around: 2016-03-30 14:54:16 +0000
Running for: 100000 iterations
Rehearsal ------------------------------------------------------
Random.new_seed 0.090000 1.240000 1.330000 ( 1.323970)
PCGRandom.new_seed 0.100000 1.150000 1.250000 ( 1.254944)
--------------------------------------------- total: 2.580000sec
user system total real
Random.new_seed 0.110000 1.200000 1.310000 ( 1.321571)
PCGRandom.new_seed 0.100000 1.130000 1.230000 ( 1.222634)
Benchmark of Random.raw_seed(16) vs PCGRandom.raw_seed(16)
==================================================
Benchmark created around: 2016-03-30 14:41:26 +0000
Running for: 100000 iterations
Rehearsal ----------------------------------------------------------
Random.raw_seed(16) 0.080000 1.440000 1.520000 ( 1.515513)
PCGRandom.raw_seed(16) 0.110000 1.320000 1.430000 ( 1.444519)
------------------------------------------------- total: 2.950000sec
user system total real
Random.raw_seed(16) 0.080000 1.470000 1.550000 ( 1.563351)
PCGRandom.raw_seed(16) 0.090000 1.340000 1.430000 ( 1.441253)
Kernel::Random
FAQs
Unknown package
We found that pcg_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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.