Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
saucenao api wrapper
This package is an api wrapper for SauceNAO.
const SauceNAO = require('saucenao')
let sauce = (await SauceNAO('picture.png')).json
input
string or object. An image url, filename, Buffer
, or fs
readable stream.options
object. Any extra parameters you would like to pass in the request body.IncomingMessage
with extra properties.
body
string. The plain text body received from SauceNAO's servers.json
object. The body parsed as JSON (for your convenience).response
Response. If the error happened after the response was received (most likely because of a JSON parse error), the IncomingMessage
that the promise resolves to will still be available here.response.json
will not have been defined yet, but you may be able to print out response.body
to figure out what went wrong.This function is fairly simple. It mostly just performs a request to SauceNAO for you, so that you can skip a couple function calls. It can work with local filepaths, urls that begin with http://
or https://
, fs
input streams, or even buffers.
After it receives a reply from SauceNAO, it'll attempt to parse it as JSON and add it to the Response object for your convenience. It'll return a promise that either resolves to this extended Response object or rejects an error containing as much of this extended Response object as it generated.
If you have an api key, you can specify it by using this function like a constructor. This gives you a new function that works exactly the same way as the function above, but your requests will be authenticated.
const SauceNAO = require('saucenao')
let mySauce = new SauceNAO('api_key here')
mySauce(imageDataBuffer).then((response) => {
console.log('Request successful')
console.dir(response.json)
}, (error) => {
console.error('Request encountered an error')
console.dir(error.request)
})
FAQs
saucenao api wrapper
We found that saucenao 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 a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.