Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
a calculator module for Python and Rust capable of computing arbitrarily long equations and functions.
These tests were done using hyperfine and the speed-test.sh script in the test folder
testing python version:
Benchmark 1: python -c "import calculator as calc; calc.solve_func(\"f(x)= 4+3x+x**2+x**3\", -1000, 1000)"
Time (mean ± σ): 1.150 s ± 0.018 s [User: 1.130 s, System: 0.016 s]
Range (min … max): 1.126 s … 1.231 s 50 runs
testing rust version:
Benchmark 1: python -c "import calculators as calc; calc.solve_func(\"f(x)= 4+3x+x^2+x^3\", -1000, 1000)"
Time (mean ± σ): 11.8 ms ± 0.8 ms [User: 10.6 ms, System: 3.6 ms]
Range (min … max): 11.1 ms … 14.5 ms 25 runs
As you can see the rust version is significantly faster.
there are three functions that this libray exposes:
Function | Args | Description |
---|---|---|
solve | equasions: list(str) | takes a list of equations as strings and solves eatch one returning a list of answers. |
solve_func | f: str, start: int, stop: int | solves the function, f, at all integer points between start and stop. |
solve_funcs | fs: list(str), start: int, stop: int | solves a list of functions, fs, for all integer points between start and stop. returns a dictionary whose keys are function names and whose values are a tuple of a list of x values and a list of y values. |
with pip:
pip install calc-rs
FAQs
Unknown package
We found that calc-rs demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.