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.
This package is a thin wrapper that contains Python bindings for the Rust crate imghash-rs
that allows you to generate various image hashes. the following hashes are supported:
If you want to know more about the different hashes or how they get encoded / decoded, check the documentation of imghash-rs
.
To get started add the package to your project:
pip install imghash-rs
Then you can use it by importing the different functions:
from imghash import average_hash, difference_hash, perceptual_hash
ahash = average_hash("path/to/image")
print(ahash.hex()) # will return the hash encoded as string
print(ahash.bits()) # will return a 2D list of bools that are the encoded bits
To learn more about the underlying bit matrix that gets generated, check this document.
FAQs
Image hashing powered by Rust!
We found that imghash-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.
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.