Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
let discord = require("discord.js")
let rpcGenerator = require("bloby12hap")
var uuid = ()=>([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,a=>(a^Math.random()*16>>a/4).toString(16))// ou require("uuid/v4")
let client = new discord.Client()
client.login("ton token")
client.on("ready", () => {
rpcGenerator.getRpcImage("383226320970055681", "IMAGE ID")
.then(image => {
let presence = new rpcGenerator.Rpc()
.setName("Ma rpc")
.setUrl("https://twitch.tv/discord")
.setType("STREAMING")
.setApplicationId("383226320970055681")
.setAssetsLargeImage(image.id)
.setAssetsLargeText(image.name)
.setDetails(":pasdechance:")
.setState("Waaaaaw")
.setParty({
size: [1, 4],
id: uuid()
})
.setDetails("d4rk")
client.user.setPresence(presence.toDiscord())
}).catch(console.error)
})
Ce code affiche la rpc suivante:
Un preset pour faire les rpc spotify existe.
let discord = require("discord.js")
let rpcGenerator = require("haprpc")
let client = new discord.Client()
client.login("ton token")
client.on("ready", () => {
let presence = rpcGenerator.createSpotifyRpc(client)
.setAssetsLargeImage("spotify:f2ed07272dec9cfc3b6805e9c59eac3391a59bed")
// vous devez utiliser des images hébergés sur spotify (cover d'album/playlist)
// pour pouvoir les afficher.
.setAssetsSmallImage("spotify:f2ed07272dec9cfc3b6805e9c59eac3391a59bed")
.setDetails("RpcGenerator - Demo")
.setState("Rpc Generator")
// Le name est un champ réservé à spotify.
// Vous ne pouvez donc pas utiliser le setName().
client.user.setPresence(presence.toDiscord())
})
Rpc généré:
Vous pouvez aussi faire des custom status avec ce module. Vous êtes obligés d'utiliser selfbot.js pour le custom status.
var discord = require("selfbot.js")
var rpcGenerator = require("haprpc")
let client = new discord.Client()
client.login("ton token")
client.on("ready", () => {
let custom = new rpcGenerator.CustomStatus()
.setState("ton text du custom status")
.setUnicodeEmoji("⚡")
client.user.setCustomStatus(custom.toDiscord())
})
Résultat:
Un conseil, utilisez selfbot.js. C'est discord.js, mais avec les User-Agent changés pour empêcher Discord de voir que vous utilisez un selfbot. (évite les ban discord) Pour l'utiliser:
1. npm i selfbot.js
2. let discord = require("selfbot.js")
Dans la prochaine version: Vous pourrez faire des recherche sur l'api de spotify à partir du module. Util pour trouver vos assets de spotify
FAQs
rpc sans maj pour safe
The npm package haprpc receives a total of 2 weekly downloads. As such, haprpc popularity was classified as not popular.
We found that haprpc 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
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.