Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
brazuka-zap
Advanced tools
Brazuka-Zap is an unofficial solution. We are not responsible for its use in production.
npm i brazuka-zap
or
yarn add brazuka-zap
At the beginning it will display a QR Code on Terminal, just scan it using WhatsApp app. Your session will be remembered, there is no need to authenticate everytime.
With the start function, you can define a name for the session (passed as a string parameter), so you can have multiple WhatsApp sessions at the same time.
For the library to work correctly it is necessary to run the functions using async and await.
import BrazukaZap from 'brazuka-zap';
test()
async function test(){
var brazuka = new BrazukaZap();
await brazuka.start(); // or await brazuka.start('session_name');
}
import BrazukaZap from 'brazuka-zap';
const phone = '558812345678'
const message = 'I\'ll be there for you'
await brazuka.sendMessage(phone, message)
import BrazukaZap from 'brazuka-zap';
const phones = ['558812345678','556187654321']
const message = 'When the rain starts to pour'
await brazuka.sendMessage(phones, message)
import BrazukaZap from 'brazuka-zap';
const phone = '558812345678'
const path = 'path/to/image.jpg'
const imageName = 'my-image-name'
const caption = 'my-caption'
await brazuka.sendImage(phone, path, imageName, caption)
import BrazukaZap from 'brazuka-zap';
const phone = '558812345678'
const link = 'https://youtu.be/RIjTq_OdFvo'
const message = 'You\'re still in bed at ten\nAnd work began at eight'
await brazuka.sendLinkPreview(phone, message)
import BrazukaZap from 'brazuka-zap';
const phone = '558812345678'
const latitude = '-3.7594297599906294'
const longitude = '-40.81624143391349'
const local = 'Brasil'
await brazuka.sendLocation(phone, latitude, longitude, local)
The Bot will be listening to WhatsApp connected, and when it receives a new message, the Bot will respond according to what was previously registered. You can use Artificial Intelligence to improve your Bot if you wish.
try {
var zap = new BrazukaZap();
await zap.start();
zap.onMessage((msg: any) => {
switch (msg.body.toLowerCase()) {
case 'hi': {
zap.sendMessage(msg.from, `Hello ${msg.sender.pushname}, welcome to my awesome company!`)
break
}
case 'catalog': {
zap.sendMessage(msg.from, 'Alright, I\'ll be sending you our product catalog!')
break
}
case 'address': {
zap.sendMessage(msg.from, 'Our address is: 666 Park Avenue')
break
}
default: {
zap.sendMessage(msg.from, 'Sorry, I couldn\'t understand, I\'m still learning about your world! 🤖')
break
}
}
})
} catch (err) {
console.log(err)
}
{
"phone": "558812345678-1646089273",
"message": "Hello, welcome to my awesome company!",
"status": "OK",
"error": false
}
To customize the message, you will have the following properties to use, via the msg
variable passed in the onMessage
function
{
"id":"false_558812345678-1646200718@g.us_1BG7C215D2D4F156AE84E0862DD58880",
"body":"Hi",
"type":"chat",
"t":1636110320,
"notifyName":"",
"from":"558812345678-1646200718@g.us",
"to":"558898765432@c.us",
"author":"558812345678@c.us",
"self":"in",
"ack":0,
"invis":false,
"isNewMsg":true,
"star":false,
"recvFresh":true,
"isFromTemplate":false,
"broadcast":false,
"mentionedJidList":[
],
"isVcardOverMmsDocument":false,
"isForwarded":false,
"labels":[
],
"ephemeralOutOfSync":false,
"productHeaderImageRejected":false,
"isDynamicReplyButtonsMsg":false,
"isMdHistoryMsg":false,
"chatId":"558812345678-1646200718@g.us",
"fromMe":false,
"sender":{
"id":"558812345678@c.us",
"name":"Daniel",
"shortName":"Daniel",
"pushname":"Daniel Albuquerque",
"type":"in",
"isBusiness":false,
"isEnterprise":false,
"statusMute":false,
"labels":[
],
"formattedName":"Daniel",
"isMe":false,
"isMyContact":true,
"isPSA":false,
"isUser":true,
"isWAContact":true,
"profilePicThumbObj":{
"eurl":"https://pps.whatsapp.net/v/t61.24694-24/155555555_000000000000000_777441025896523658_n.jpg?ccb=11-4&oh=a5024da3cd299dbaf16b1da1a4a98ee6&oe=60F16F53",
"id":"558812345678@c.us",
"img":"https://web.whatsapp.com/pp?e=https%3A%2F%2Fpps.whatsapp.net%2Fv%2Ft61.24694-24%2F153312958_000000000000000_777441025896523658_n.jpg%3Fccb%3D11-4%26oh%3Da5024da3cd299dbaf16b1da1a4a98ee6%26oe%3D60F16F53&t=s&u=558812345678%40c.us&i=1613954550&n=q417zd84AaHW0He4pHzwT3lADc7RH%2BDbvUuDBwScb%2F4%3D",
"imgFull":"https://web.whatsapp.com/pp?e=https%3A%2F%2Fpps.whatsapp.net%2Fv%2Ft61.24694-24%2F153312958_000000000000000_777441025896523658_n.jpg%3Fccb%3D11-4%26oh%3Da5024da3cd299dbaf16b1da1a4a98ee6%26oe%3D60F16F53&t=l&u=558812345678%40c.us&i=1613954550&n=q417zd84AaHW0He4pHzwT3lADc7RH%2BDbvUuDBwScb%2F4%3D",
"raw":null,
"tag":"1613454350"
},
"msgs":null
},
"timestamp":1836010520,
"content":"Hi",
"isGroupMsg":true,
"isMedia":false,
"isNotification":false,
"isPSA":false,
"chat":{
"id":"558812345678-1646200718@g.us",
"pendingMsgs":false,
"lastReceivedKey":{
"fromMe":true,
"remote":"558812345678-1646200718@g.us",
"id":"1IBRGOQDW44CNCDN9TFQ",
"_serialized":"true_558812345678-1646200718@g.us_1IBRGOQDW44CNCDN9TFQ"
},
"t":1626118707,
"unreadCount":0,
"archive":false,
"isReadOnly":false,
"isAnnounceGrpRestrict":false,
"muteExpiration":0,
"name":"HL",
"notSpam":true,
"pin":0,
"msgs":null,
"kind":"group",
"isGroup":true,
"contact":{
"id":"558812345678-1646200718@g.us",
"name":"HL",
"type":"in",
"isBusiness":false,
"isEnterprise":false,
"statusMute":false,
"labels":[
],
"formattedName":"HL",
"isMe":false,
"isMyContact":false,
"isPSA":false,
"isUser":false,
"isWAContact":false,
"profilePicThumbObj":[
"Object"
],
"msgs":null
},
"groupMetadata":{
"id":"558812345678-1646200718@g.us",
"creation":1646200718,
"owner":"558812345678@c.us",
"restrict":false,
"announce":false,
"noFrequentlyForwarded":false,
"ephemeralDuration":0,
"support":false,
"uniqueShortNameMap":{
},
"participants":[
"Array"
],
"pendingParticipants":[
]
},
"presence":{
"id":"558812345678-1646200718@g.us",
"chatstates":[
"Array"
]
},
"isOnline":true,
"lastSeen":null
}
}
New functions will be added soon.
Contributions make the open source community an amazing place to learn, inspire and create. Any contribution you make will be much appreciated.
Distributed under license MIT. © Daniel Albuquerque
FAQs
Provides an API to send bulk messages via WhatsApp based on Venom Bot
The npm package brazuka-zap receives a total of 5 weekly downloads. As such, brazuka-zap popularity was classified as not popular.
We found that brazuka-zap 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
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.