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.
[!WARNING] DO NOT USE THIS TOOL FOR IMPORTANT THINGS. This tool can stop working without notice since it depends on libraries that could be removed any time from GitHub/NPM.
Keep in mind that the working of RoleeWSP depends on the Baileys library and since that is not an official supported library by WhatsApp it could stop working without notice.
Using npx
, installation is not necessary. You can run RoleeWSP on a system
with NodeJS 16 or higher from the command-line as follows:
npx roleewsp@latest -V
this should display the version number of the latest release.
Using npm
roleewsp can be installed globally as follows:
npm install -g roleewsp
Binaries for different platforms (Linux, Windows) are available on the latest release page.
RoleeWSP can also run inside a Docker container:
docker run roleesoft/roleewsp
Since RoleeWSP keeps authentication state on disk you need to mount a state directory outside the container, for example:
docker run -v $HOME/.local/share/roleewsp:/usr/src/app/cache -it roleesoft/roleewsp login
or:
docker run -v $HOME/.local/share/roleewsp:/usr/src/app/cache roleesoft/roleewsp me
You can build the Docker image using the supplied Dockerfile
:
docker build -t roleewsp .
Test if the build was successful:
docker run -it roleewsp
If you chose to use docker-compose
instead of docker
you can build the
Docker image using the supplied assets/docker-compose.yml
file (which in turn
depends on the supplied Dockerfile
):
cd assets/
docker-compose build
Test if the build was successful:
docker-compose run roleewsp
Since RoleeWSP keeps authentication state on disk you need to mount a state
directory outside the container, for example in ~/.local/share/roleewsp
:
See respective lines in docker-compose.yml
volumes:
- ~/.local/share/roleewsp:/usr/src/app/cache
Available commands and options can be listed with --help
flag:
npx roleewsp@latest --help
for most command it's necessary that you've authorized RoleeWSP to interact with the WhatsApp API on your behalf. This can be done by logging in as described below.
To login you need to authorize RoleeWSP from another device that has WhatsApp installed and scan the QR code printed in the terminal:
npx roleewsp@latest login
█▀▀▀▀▀█ ▀▀ ▀ █ █▀▀▀▀▀█
█ ███ █ █▄ █▀▀▀▀ █ ███ █
█ ▀▀▀ █ ▀█▀▀▄▀█▀▀ █ ▀▀▀ █
▀▀▀▀▀▀▀ ▀▄▀▄▀▄█▄▀ ▀▀▀▀▀▀▀
▀███▄ ▀▄▀▄ ▀▀ █▀ ▄▀▀▀▄▀
█▄▄▄▄ ▀ ▄ ▄▄▄█▄ ▄█▀ ▄▄
▀▄ ▄▀ ▀ ▄█▄█ ▄ ▄ ██▄█ ▀▀█
▄▀▄██▀▀██▄▀ █▄▀▄▄█▀▄█ ▀▀▄
▀▀▀ ███▀▄▄ █▀▀▀█▀█▀█
█▀▀▀▀▀█ ▀▀█ ▄█ ▀ █ ▀██
█ ███ █ ▄▄█▀██▄▄▀██▀██▄▄▄
█ ▀▀▀ █ █▀▀▀▀▀ ▀▀█▀ █ █▀
▀▀▀▀▀▀▀ ▀▀▀ ▀ ▀ ▀ ▀▀▀▀▀▀
In the WhatsApp mobile app go to "Settings > Connected Devices > Connect Device" and scan the QR code. Wait until the status is "active", then you can exit RoleeWSP.
Logging out removes credentials from your local environment but will not disconnect RoleeWSP from your WhatsApp account, you can disconnect RoleeWSP using the WhatsApp app.
npx roleewsp@latest logout
Muslide supports three types of recipients for sending messages/images/files/etc.:
3161234567890
)me
123456789-987654321@g.us
Using the recipient me
you can send yourself a test message:
npx roleewsp@latest send me 'hello world'
To send a message to a phone number:
npx roleewsp@latest send 3161234567890 'hello world'
To send a message to a group you are particpating in you need the group ID (see
the roleewsp groups
command). Send a message to a group as follows:
npx roleewsp@latest send 123456789-987654321@g.us 'hello world'
Use \n
to send a message with a newline, for example:
npx roleewsp@latest send me 'hello\nworld'
Image files (PNG, JPG, GIF) can be sent to individuals or groups:
npx roleewsp@latest send-image me image.png
npx roleewsp@latest send-image 123456789-987654321@g.us image.jpg
Note In case there is a space in the path or the file name, enclose the entire path and file name in quotes (")
Use the --caption
option to add a caption to the image:
npx roleewsp@latest send-image --caption 'Your text here' me image.png
Single files can be sent to individuals or groups:
npx roleewsp@latest send-file me test.json
npx roleewsp@latest send-file 123456789-987654321@g.us document.pdf
Note In case there is a space in the path or the file name, enclose the entire path and file name in quotes (")
By default, files will be sent as "documents" and show as a download link in the chat.
The --type
option can be used for audio and video files that show as a playable message in the chat:
npx roleewsp@latest send-file --type audio 123456789-987654321@g.us music.mp3
Geographic locations can be sent to individuals or groups using latitude and longitude coordinates. For example, to position yourself at the Eiffel Tower:
npx roleewsp@latest send-location me 48.858222 2.2945
Or to send your location at the Sydney Opera House to a group:
npx roleewsp@latest send-location 123456789-987654321@g.us -33.857058 151.214897
Polls can be sent to individuals or groups, and allow participants to select 1 or more items.
For example, to send a poll for the summer holiday destination, allowing participants to select 2 items, use:
npx roleewsp@latest send-poll 123456789-987654321@g.us 'Summer holiday destination' --item 'France' --item 'Spain' --item 'Italy' --item 'Switzerland' --selectable 2
Or to send a quick poll to check who's going training on Friday:
npx roleewsp@latest send-poll 123456789-987654321@g.us 'Training on Friday' --item 'Yeeeess!' --item 'Nope' --item 'Maybe...'
To list all the groups you are participating in:
npx roleewsp@latest groups
this will show a list of group IDs and subjects.
Participants can be added/removed from existing groups as follows:
npx roleewsp@latest add-to-group 123456789-987654321@g.us 3161234567890
npx roleewsp@latest remove-from-group 123456789-987654321@g.us 3161234567890
To get the WhatsApp ID of the logged in user:
npx roleewsp@latest me
By default WhatsApp credentials are cached in a folder located in the user's
home directory. This folder is .local/share/roleewsp'
on Linux & macOS and
AppData\Local\roleewsp\Data
on Windows.
A different location for the cache folder can be configured via the environment
variable ROLEEWSP_CACHE_FOLDER
or the -c
/--cache
options.
When the global option --proxy
is used, RoleeWSP will use the environment variables HTTP_PROXY
and HTTPS_PROXY
to
proxy all requests. For example:
export HTTP_PROXY=http://USER:PASS@proxy.server.com:80
export HTTPS_PROXY=http://USER:PASS@proxy.server.com:80
npx roleewsp@latest --proxy login
In case RoleeWSP does not give any output or does not behave as expected, try removing the local cache folder (see Configuration section), then disconnect the client using your mobile WhatsApp app, and login again.
To see what goes on in more detail, the verbosity of RoleeWSP can be incrased
with the global option -v
. Use -vvv
for the greatest level of detail:
npx roleewsp@latest -vvv me
RoleeWSP is for sending messages only. If you want to read messages (e.g. when building a chat bot), have a look at the Baileys library.
To run the unit-tests run this command:
yarn test
Please create an issue here: https://github.com/roleesoft/roleewsp/issues
If you like this software, please star :star: it.
If you have suggestions for how RoleeWSP could be improved, or want to report a bug, open an issue! All and any contributions are appreciated.
ISC © 2022 roleesoft.com@gmail.com
FAQs
WhatsApp CLI
We found that roleewsp 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.