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.
WAWEB-phi is library for controlling whatsapp web for nodejs, inspired from whatsapp-web.js and WAPI.js
What is the difference? This library uses wapi.js which contains features such as sending pictures, sending to numbers that are not in the contact list and many more
NPM
npm install waweb-phi
YARN
yarn add waweb-phi
const wa = require('waweb-phi')
const client = new wa({
puppeteer: { headless: false }
});
client.initialize();
const wa = require('waweb-phi')
const client = new wa({
puppeteer: { headless: false },//change it to true if u want hidding the chrome/headles mode
authTimeout: 30000,
// u can passing wa session here, and example, just uncoment and change to ur session
// u can see ur session when u get AUTHENTICATED
//
// session: {
// WABrowserId: '"qU5V5x/V2iasdasdTdfH5QdHc7yg=="',
// WASecretBundle:
// '{"key":"TVCj4p60Jasdasd9nklQDp+hSmK+nvCVMHK2fwID9tpShGQVo=","encKey":"do3JhuI3JvkTAuTs4UNUbZHuHasdasdGjXA+UOopphm5un2b8=","macKey":"TVCj4p60J9nklQDp+hSmK+nvCVMHK2fwID9tpShGQVo="}',
// WAToken1: '"F+hVGpk5GwmSNhasdasd1bQYlPaffAL//Oc00Oj9C9VZqWlBQ="',
// WAToken2:
// '"1@RDZOZEmI8Yxi8m8qw3spzoNK/YqfI8JGLxzWSJ5jeVJVp8faNGDB6asdasdasdLXSuxiA1gvyFeSapmChrc6JfA=="'
// }
});
client.initialize();
client.on('qr', (qr) => {
console.log('QR RECEIVED', qr);
});
client.on('authenticated', (session) => {
console.log('AUTHENTICATED', session);
});
client.on('auth_failure', msg => {
console.error('AUTHENTICATION FAILURE', msg);
})
client.on('ready', () => {
console.log('READY');
// send message, u can send to anyone, even if number not saved in ur contact
client.sendMessage("628950609xxxx@c.us", `test`).then((r) => {
console.log("sendMessage",r)
})
// bingung kata2nya pokoknya event ceklis 1 ceklis 2 ceklis 2 biru
client.on('ack', (data) => {
console.log('ACK', data);
});
// send Attachment,image/rar/video anythings
// convert to base64 first
let base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trC0+rkXxz59onwToD7uppL/Jpk+X603awGjz37cEnrRnWm6s/e5lTeKOx4U1RsK4tPmuZ8zn7l+V8WfHTHDB3jM9/HinkgsFnL3OWCy1zNrr0y7+r+f8A+ZxMd2rKwo4AAAAASUVORK5CYII=`
client.sendAttach(base64file,'caption','namafile.png',"628950609xxxx@c.us").then((r) => {
console.log("sendMessage",r)
})
// get Device Info
client.deviceInfo().then((r) => {
console.log("deviceInfo", r)
})
// return
// { wa_version: '2.20.28',
// mcc: '510',
// mnc: '010',
// os_version: '9',
// device_manufacturer: 'OPPO',
// device_model: 'RMX1801',
// os_build_number: 'RMX1801EX_11_C.26' }
// get Send Seen
client.sendSeen('628950609xxxx@c.us').then((r) => {
console.log("sendSeen", r)
})
// get battery level
client.getBatteryLevel().then((r) => {
console.log("getBatteryLevel", r)
})
// cek number status
let number = "628950609xxxx@c.us"
client.checkNumberStatus(number).then((r) => {
console.log("NumberStatus", r)
})
// also you can access wapi.js directly
});
client.on('message', async msg => {
console.log('MESSAGE RECEIVED', msg);
});
client.on('disconnected', () => {
console.log('Client was logged out');
})
important
WAPI.js FunctionThis code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries. This is an independent and unofficial software. Use at your own risk. Commercial use of this code/repo is strictly prohibited.
made with 💗
FAQs
control whatsapp web with nodejs
We found that waweb-phi 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.