• Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Menu
  • Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Search
Close
  • Home
  • 2018
  • August
  • 8
  • Whatsapp Automation for Sending and Receiving Messages

Whatsapp Automation for Sending and Receiving Messages

August 8, 2018 Comments Off on Whatsapp Automation for Sending and Receiving Messages
send receive messages with whatsapp automatically whatsapp automation whatsapp tricks 2018

Whatsapp Automation is a collection of APIs that interact with WhatsApp messenger running in an Android emulator, allowing developers to build projects that automate sending and receiving messages, adding new contacts and broadcasting messages multiple contacts.

The project uses Selinium, Appium, Python and Android Virtual Device Emulator.

Demo Video..

WhatsApp Automation Demo Video

Requirements:

  1. java
  2. Android Studio & Android Emulator setup with latest Android version
  3. Appium Server to interact with Emulator
  4. python environment for running Flask
  5. RabbitMQ for maintaining queue system for incoming requests

Setting up:

[Configuration]

Edit configs/dev.cfg file with your mysql credentials, RabbitMQ credentials and Queue names created. Queue names needs to be created prior to running.

  1. Create Queue with appropriate name.
  2. Create Exchange with appropriate name.
  3. Bind Exchange with Queue and make routing key in format (queue_name.*) and exchange in format (queue_name.exchange)

Attached are the Screenshot for reference:

Rabbit MQ 1

Rabbit MQ 2

After Configuration is done, here are the steps for running

  1. Make a virtulenv for your project
  2. Once you have activated your virtualenv, install the dependencies with command (pip install -r whatsapp_pip_requirement.txt)
  3. Now you need to start the emulator first via command line (./Android/Sdk/emulator/emulator -avd pixel_1). pixel_1 is my avd name
  4. You need to start the appium server with default capabilities set as (“noReset”=”true”)
  5. Once both Emulator and Appium are running, Now you will run your main app.py file.
  6. Specify the environment by typing (export ENV=dev) in terminal, So that dev.cfg is read for configuration.
  7. Type (python app.py) to run main flask application
  8. Now similarly open new tabs, activate virtual env and export the dev environment. Then run (python single_message_producer.py). RabbitMQ consumer to listen to single message queue.
  9. ( python add_new_contact_producer.py) (python broadcast_message_producer.py) (python new_message_listener_producer.py)

Now at this point you have your Android Virtual Emulator Running, Appium running, Flask running, and rabbit MQ with workers running.

For the very first time you will need to setup Whatsapp manually with some Mobile Number with which it will be sending Messages. You need to verify OTP for Whatsapp and just set it up for use.

Now here are the Apis exposed by this project with which everything will be automated.

Adding contact in Google Contacts APP

URL : http://127.0.0.1:5000/api/v0.1/add_new_contact

TYPE : POST

HEADERS :

Content-Type:application/json

BODY :

{“mobile_number”:”+91 XXXXX XXXXX”,”emulator_name”:”pixel_1″}

RESPONSE :

{ “corr_id”: “767ae095-0066-49fb-b955-063286ceed1e”, “message”: “Singal received for Adding Contact”, “status”: “1” }

Sending Single Message via Whatsapp

URL : http://127.0.0.1:5000/api/v0.1/send_single_message

TYPE: POST

HEADERS :

Content-Type:application/json

BODY :

{“mobile_number”:”+91 XXXXX XXXXX”,”emulator_name”:”pixel_1″,”message_body”:”Hi Mayank! How have you been, its been years since we talked.”}

Response :

{ “corr_id”: “78f21f25-b781-4312-87e5-ebcd73e9b67e”, “message”: “Singal received for sending message”, “status”: “1” }

Sending Broadcast Message via Whatsapp

URL : http://127.0.0.1:5000/api/v0.1/send_broadcast_message

TYPE : POST

HEADERS :

Content-Type:application/json

BODY :

{“mobile_number_list”:[“+91 XXXXX XXXXX”,”+91 XXXXX XXXXX”],”emulator_name”:”pixel_1″,”message_body”:”Hey guys! Enjoy the game!”}

RESPONSE :

{ “corr_id”: “ea8894c1-8193-46de-8269-033060135791”, “message”: “Singal received for sending message”, “status”: “1” }

Listen New Incoming Message via Whatsapp

URL : http://127.0.0.1:5000/api/v0.1/listen_new_message

TYPE : POST

HEADERS:

Content-Type:application/json

BODY :

{“special_code”:”e3gi8d2i8d2382@@#”}

RESPONSE :

{ “corr_id”: “a2952cc1-0703-4362-9740-88ede47391cb”, “message”: “Singal received for listening message”, “status”: “1” }

Points to Remember:

  1. Android Version and Whatsapp Version needs to taken care because code is written specific to versions. you can go to workers folder and edit files accordingly to change your platform version and activity class. Like Current Code has: desired_caps[‘platformName’] = ‘Android’ desired_caps[‘platformVersion’] = ‘9’ desired_caps[‘deviceName’] = ’emulator-5554′ desired_caps[‘appPackage’] = ‘com.whatsapp’ desired_caps[‘appActivity’] = ‘.Main’

Note: This is just an Experimental Demo which is not intended to voilate any Terms and Conditions of Whatsapp

Post navigation

ReelPhish – A Real-Time Two-Factor Phishing Tool
Apfell – A macOS, Post-Exploit, Red Teaming Framework

Related Articles

PassPie – Multiplatform Command-Line Password Manager

- Tricks & How To's
July 8, 2019

XGC – Xbox Gift Card Trick to get Cheaper Games

- News, Tricks & How To's
May 23, 2019

Machinae Security Intelligence Collector

- Threat Intelligence, Tricks & How To's
May 19, 2019July 27, 2019
hacker gadgets
hacker phone covers

Recent Posts

Waf-Bypass - Check Your WAF Before An Attacker Does

Waf-Bypass – Check Your WAF Before An Attacker Does

March 26, 2023
QRExfiltrate - Tool That Allows You To Convert Any Binary File Into A QRcode Movie. The Data Can Then Be Reassembled Visually Allowing Exfiltration Of Data In Air Gapped Systems

QRExfiltrate – Tool That Allows You To Convert Any Binary File Into A QRcode Movie. The Data Can Then Be Reassembled Visually Allowing Exfiltration Of Data In Air Gapped Systems

March 25, 2023
Hackers are Exploiting Critical Security Vulnerability in WooCommerce Payments Plugin

Hackers are Exploiting Critical Security Vulnerability in WooCommerce Payments Plugin

March 25, 2023
CVE-2022-47502: RCE security vulnerability in Apache OpenOffice

CVE-2022-47502: RCE security vulnerability in Apache OpenOffice

March 25, 2023
WPAxFuzz: full-featured open-source Wi-Fi fuzzer

WPAxFuzz: full-featured open-source Wi-Fi fuzzer

March 24, 2023
Mimicry is a security tool developed by Chaitin Technology for active deception in exploitation and post-exploitation. (4)

Mimicry – Security Tool For Active Deception In Exploitation And Post-Exploitation

March 24, 2023

Social Media Hacking

SocialPath – Track users across Social Media Platforms

SocialPath – Track users across Social Media Platforms

- Social Media Hacking
October 16, 2019October 16, 2019

SocialPath is a django application for gathering social media intelligence on specific username. It checks for Twitter, Instagram, Facebook, Reddit...

SocialScan – Check Email Address and Username Availability on Online Platforms

SocialScan – Check Email Address and Username Availability on Online Platforms

June 17, 2019
Shellphish – Phishing Tool For 18 Social Media Apps

Shellphish – Phishing Tool For 18 Social Media Apps

June 10, 2019July 27, 2019
WhatsApp Hacking using QRLJacking

WhatsApp Hacking using QRLJacking

May 2, 2019May 19, 2019
How to Hack any Facebook Account with Z-Shadow

How to Hack any Facebook Account with Z-Shadow

April 26, 2019June 29, 2020
hacker buffs

About Us

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Join Our Community!

Please wait...
Get the latest News and Hacking Tools delivered to your inbox.
Don't Worry ! You will not be spammed

Active Members

Submit a Tool

Hackers Handbook 2018


Grab your copy here

ABOUT US

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Our primary focus revolves around the latest tools released in the Infosec community and provide a platform for developers to showcase their skillset and current projects.

COMPANY
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Menu
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Live Chat
RESOURCES
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Menu
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Get Started
TOOLBOX
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Menu
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Tools Directory

2014 – 2020 | Haxf4rall.com               Stay Connected:

Facebook Twitter Google-plus Wordpress
Please wait...

Join Our Community

Subscribe now and get your free HACKERS HANDBOOK

Don't Worry ! You will not be spammed
SIGN UP FOR NEWSLETTER NOW