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.
r-functions
Advanced tools
Example:
// declaration variable conn
const conn = client.conn
// send a text message (auto tagged)
conn.reply(m.chat, `Hello World`, m)
// send a react message
conn.sendReact(m.chat, `💀`, m.key)
// send a text message with progress bar
conn.sendProgress(m.chat, `Hello World`, m)
// send a ptv message from path, url, or buffer (video duration 10s)
conn.sendPtv(m.chat, `./src/video/tiktok.mp4`)
// send a text message with custom thumbnail
conn.sendMessageModify(m.chat, `Hello World`, m, {
title: '© pycos-bot',
largeThumb: true,
ads: false,
/* can buffer or url */
thumbnail: 'https://telegra.ph/file/a7ac2b46f82ef7ea083f9.jpg',
link: 'httpsr-devs.xyz'
})
// send a text message with custom thumbnail & fake quoted
conn.sendMessageModifyV2(m.chat, `Hello World`, '© pycos-bot', {
title: '© pycos-bot',
largeThumb: true,
ads: false,
/* can buffer or url */
thumbnail: 'https://telegra.ph/file/a7ac2b46f82ef7ea083f9.jpg',
link: 'https://r-devs.xyz'
})
// send a text message with fake quoted
conn.sendMessageVerify(m.chat, `Hello World`, '© pycos-bot')
// send a file from path, url, or buffer (auto extension)
conn.sendFile(m.chat, 'https://telegra.ph/file/a7ac2b46f82ef7ea083f9.jpg', 'image.jpg', 'Hello World', m)
// send a document from path, url, or buffer (auto extension)
conn.sendFile(m.chat, 'https://telegra.ph/file/a7ac2b46f82ef7ea083f9.jpg', 'image.jpg', 'Hello World', m, {
document: true
})
// send a voicenote from path, url, or buffer
conn.sendFile(m.chat, './src/mp3/chocos.mp3', '', '', m, {
ptt: true
})
// send a audio from path, url, or buffer with thumbnail in audio tag
conn.sendFile(m.chat, './src/mp3/chocos.mp3', '', '', m, {
APIC: < Buffer >
})
// send a sticker message from url or buffer
conn.sendSticker(m.chat, 'https://telegra.ph/file/a7ac2b46f82ef7ea083f9.jpg', m, {
packname: 'Powered by',
author: '© pycos-bot'
})
// send polling message
conn.sendPoll(m.chat, 'Do u like this library?', {
options: ['Yes bro', 'Not yet'],
multiselect: false
})
// send contact message
conn.sendContact(m.chat, [{
name: 'Rasya R.',
number: '6285791346128',
about: 'Developers'
}], m, {
org: 'Developers Internasional',
website: 'https://r-devs.xyz',
email: 'contact@rasyafs.me'
})
// forward message
conn.copyNForward(m.chat, m)
// send button message (your own risk)
var buttons = [{
name: "quick_reply",
buttonParamsJson: JSON.stringify({
display_text: "Developer",
id: '.devs'
}),
}, {
name: "cta_url",
buttonParamsJson: JSON.stringify({
display_text: "Website",
url: "https://r-devs.xyz",
merchant_url: "https://r-devs.xyz"
})
}, {
name: "cta_copy",
buttonParamsJson: JSON.stringify({
display_text: "Copy",
copy_code: "987654"
})
}, {
name: "cta_call",
buttonParamsJson: JSON.stringify({
display_text: "Call",
phone_number: "6285791346128"
})
}, {
name: "single_select",
buttonParamsJson: JSON.stringify({
title: "Click This!",
sections: [{
rows: [{
title: "Owner",
description: `Ny Developers`,
id: `.owner`
}, {
title: "Runtime",
description: `Runtime`,
id: `.run`
}]
}]
})
}]
// button & list
client.sendIAMessage(m.chat, buttons, m, {
header: '',
content: 'Hello World!',
footer: '',
media: global.db.setting.cover // video or image link
})
// carousel message
const cards = [{
header: {
imageMessage: global.cover,
hasMediaAttachment: true,
},
body: {
text: "Hello World"
},
nativeFlowMessage: {
buttons: [{
name: "cta_url",
buttonParamsJson: JSON.stringify({
display_text: 'Contact Owner',
url: 'https://r-devs.xyz',
webview_presentation: null
})
}]
}
}, {
header: {
imageMessage: global.cover,
hasMediaAttachment: true,
},
body: {
text: "Hello World"
},
nativeFlowMessage: {
buttons: [{
name: "cta_url",
buttonParamsJson: JSON.stringify({
display_text: 'Contact Owner',
url: 'https://r-devs.xyz',
webview_presentation: null
})
}]
}
}]
client.sendCarousel(m.chat, cards, m, {
content: 'Hello World!'
})
FAQs
Functions for bot whatsapp
The npm package r-functions receives a total of 4 weekly downloads. As such, r-functions popularity was classified as not popular.
We found that r-functions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.