
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
node-reddit-js
Advanced tools
A Node.js Reddit module that attempts to fully cover the Reddit API.
This is not done yet, currently YOU have to make the requests to the endpoints yourself, but soon it'll all be done in the background for you.
// import the package
const Reddit = require("node-reddit-js")
// import only the client class
const { Client } = require("node-reddit-js")
const client = new Reddit.Client({
id: "APP_ID",
secret: "APP_SECRET",
username: "REDDIT_USERNAME",
password: "REDDIT_PASSWORD",
})
client.api.v1.me.karma.get() // GET https://oauth.reddit.com/api/v1/me/karma
/*
{
kind: 'KarmaList',
data: [
{ sr: 'dankmemes', comment_karma: 65, link_karma: 6985 },
{ sr: 'memes', comment_karma: 231, link_karma: 6074 },
// ...
]
}
*/
Some endpoints don't require authorisation:
// don't authorise with the token
client.reddit.new.get({ auth: false }) // GET https://reddit.com/new
/*
{
kind: "Listing",
data: {
// ...
}
}
*/
const client = new Reddit.Client()
client.reddit.r.dankmemes.comments.jiiz5o.get({ auth: false }) // GET https://www.reddit.com/r/dankmemes/comments/jiiz5o
/*
[
// post
{
kind: "Listing",
data: {
// ...
}
},
// comments
{
kind: "Listing",
data: {
// ...
}
}
]
*/
// The url changes from oauth.reddit.com to www.reddit.com if you're not authorising
// i'll just use reddit.com here to keep things simple
client.reddit // https://reddit.com
client.api // https://reddit.com/api (shortcut, client.reddit.api)
client.v1 // https://reddit.com/api/v1 (shortcut again, client.reddit.api.v1 or client.api.v1)
client.reddit.top // https://reddit.com/top
client.reddit.r.subreddit // https://reddit.com/r/subreddit
client.reddit("r/subreddit") // https://reddit.com/r/subreddit
client.reddit["r/subreddit"] // https://reddit.com/r/subreddit
client.reddit.a.b("c", "d").e["f"] // https://reddit.com/a/b/c/d/e/f
// Making requests
client.reddit.new.get({ // GET https://reddit.com/new?limit=2
data: {
limit: 2
}
})
client.api.whatever.you.want.post({ // POST https://reddit.com/whatever/you/want with data {"some":"thing"}
data: {
some: "thing"
}
})
client.v1.me.prefs.patch({ // PATCH https://reddit.com/api/v1/me/prefs with data {...}
data: {
// ...
}
})
// any data you need to send or query onto the url goes into the data field
FAQs
A Node.js Reddit module that attempts to fully cover the Reddit API.
We found that node-reddit-js 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.