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.
Exact copy from booru just removed the nsfw sites
sb
for safebooru.org
)order:random
on sites that support it and using a bit of magic on sites that don'tnpm i --save sfwbooru
const booru = require('sfwbooru')
booru.search(site, [tag1, tag2], {limit: 1, random: false})
.then(booru.commonfy)
.then(images => {
//Log the direct link to each image
for (let image of images) {
console.log(image.common.file_url)
}
})
.catch(err => {
if (err.name === 'booruError') {
//It's a custom error thrown by the package
console.log(err.message)
} else {
//This means I messed up. Whoops.
console.log(err)
}
})
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
site | string | none | The site to search, supports aliases | |
tags | string[] | X | [] | The tags to search with |
options | SearchOptions | X | {} | For amount of images to fetch and if to return a random result or not (Check below table) |
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
limit | number | X | 1 | The max amount of images to return |
random | boolean | X | false | If the images returned should be random everytime |
who am i kidding nobody asks me questions
Calling booru.commonfy
not only transforms all the xml into json, it adds a .common prop to each image
common: {
file_url: 'https://aaaa.com/image.jpg', //The direct link to the image, ready to post
id: '124125', //The image ID, as a string
tags: ['cat', 'cute'], //The tags, split into an Array
score: 5, //The score as a Number
source: 'https://giraffedu.ck/aaaa.png', //source of the image, if supplied
rating: 's' //rating of the image
}
FAQs
Search different sfw boorus!
We found that sfwbooru 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.