Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
safe-images
Advanced tools
A Node.js package for detecting NSFW (Not Safe For Work) content in images using the SmartClick AI NSFW Detection API.
Install the package using npm:
npm install safe-Images
Import Package:
const SafeImage = require('safe-Images');
const safeImage = new SafeImage();
Usage with URL:
const imageURL = 'https://example.com/path/to/image.jpg';
safeImage.detectFromURL(imageURL)
.then((result) => {
console.log('Not Safe:', result);
})
.catch((error) => {
console.error('Error:', error.message);
});
Usage with image file (Buffer):
const fs = require('fs');
const imageFilePath = 'path/to/your/image.jpg';
const imageBuffer = fs.readFileSync(imageFilePath);
safeImage.detectFromFile(imageBuffer)
.then((result) => {
console.log('Not Safe:', result);
})
.catch((error) => {
console.error('Error:', error.message);
});
const safeImage = new SafeImage("YOUR_CUSTOM_API_KEY");
To use the NSFW detection service, you need to obtain an API key from SmartClick AI . You can either pass your custom API key when creating an instance of the SafeImage
class or leave it empty to use the default API key.
This package is open-source and available under the LICENSE .
This package relies on an external NSFW detection service provided by SmartClick AI. Make sure you comply with their terms of service and usage policy.
If you encounter any issues or have suggestions for improvements, please open an issue on GitHub.
FAQs
Safe Image Package To Check Images Safty
The npm package safe-images receives a total of 5 weekly downloads. As such, safe-images popularity was classified as not popular.
We found that safe-images 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.