WhatsApp Multi Device Client

Overview

WhatsApp MultiDevice client

Literally everything combined from:

  1. https://github.com/adiwajshing/baileys/tree/multi-device
  2. https://github.com/tgalal/yowsup
  3. https://github.com/sigalor/whatsapp-web-reveng
  4. https://github.com/tulir/whatsmeow

Installation:

 git clone [email protected]:harianjalundu77/wamd.git
 cd wamd
 pip3 install -r requirements.txt
 python3 setup.py install --record install.txt

Or using venv:

python3 -m venv venv
source venv/bin/activate
git clone [email protected]:harianjalundu77/wamd.git
cd wamd
pip install -r requirements.txt
python setup.py install --record install.txt

if this error occured during installation:

", line 1, in File "/tmp/pip-build-a86ixoex/cryptography/setup.py", line 14, in from setuptools_rust import RustExtension ModuleNotFoundError: No module named 'setuptools_rust' ">
Traceback (most recent call last):
  File "
      
       "
      , line 1, in <module>
  File "/tmp/pip-build-a86ixoex/cryptography/setup.py", line 14, in <module>
    from setuptools_rust import RustExtension
ModuleNotFoundError: No module named 'setuptools_rust'

Update the pip:

pip install --upgrade pip

and re-run the installation

Uninstall:

xargs rm -rf < install.txt

Example:

import sys
import pyqrcode
import png # Guard for pyqrcode

from io import BytesIO

from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks

from wamd.protocol import connectToWhatsAppServer, MultiDeviceWhatsAppClientProtocol


from twisted.logger import (
    textFileLogObserver,
    FilteringLogObserver,
    LogLevelFilterPredicate,
    LogLevel,
    globalLogPublisher
)


globalLogPublisher.addObserver(
    FilteringLogObserver(
        observer=textFileLogObserver(sys.stdout, timeFormat="%Y-%M-%d %H:%M:%S"),
        predicates=[LogLevelFilterPredicate(defaultLogLevel=LogLevel.levelWithName("debug"))] # or info
    )
)


def protocolFactory():
    # Do any initialization here, such as reading session file
    # to be supplied to the protocol/connection.
    return MultiDeviceWhatsAppClientProtocol()


def handleQr(qrInfo):
    # this will require pyqrcode installed
    # or whatever library or package used to
    # render qr code

    print("\nQR Info: %r" % (qrInfo))
    qrObj = pyqrcode.create(b",".join(qrInfo), error="L")
    qrIO = BytesIO()
    qrObj.png(qrIO, scale=6)
    qrBytes = qrIO.getvalue()
    qrIO.close()

    with open("qr.png", "wb") as qrFileIO:
        qrFileIO.write(qrBytes)


def inboxReceiver(connection, message):
    print("Inbox Message: %s" % (message, ))
    if not message['fromMe'] and not message['isRead']:
        connection.sendReadReceipt(message)


@inlineCallbacks
def onConnect(connection):
    print("\nConnection 1: %r" % (connection, ))
    connection.on("qr", handleQr)

    # the new connection after successfull authentication
    # will be different than provided the first connection
    # since the connection will automatically be restarted
    # after authentication.
    connection = yield connection.authenticate()

    connection.on("inbox", inboxReceiver)
    print("\nConnection 2: %r" % (connection, ))



connectToWhatsAppServer(
    protocolFactory=protocolFactory
).addCallback(
    onConnect
).addErrback(
    lambda f: print("\nFailure : %s" % (f, ))
)

reactor.run()
Bezlik Year Calendar Planner

Bezlik Year Calendar Planner Scribus script for creating year planners on one page A1 paper format. Script is based on Year-Calendar-Script-for-Scribu

Bohdan Bobrowski 2 May 24, 2022
Simple Translator in Python

Simple Translator in Python Project Description: In this project, we'll be making a very simple translator in Python using some libraries. Requirement

Hassan Shahzad 3 Jan 23, 2022
A Discord Bot - has a few commands. Built using python - Discord.py - RIP.

Discord_Bot A Discord Bot has been built here. It is capable of running a few commands. The below present screenshot should suffice in terms of explai

Manab Kumar Biswas 1 May 22, 2022
A discord token nuker With loads of options that will screw an account up real bad, also has inbuilt massreport, GroupChat Spammer and Token/Password/Creditcard grabber and so much more!

Installation | Important | Changelogs | Discord NOTE: Hazard is not finished! You can expect bugs, crashes, and non-working functions. Please make an

Rdimo 470 Aug 09, 2022
A heraldry-related bot, designed for the Heraldry Community.

Heraldtron A heraldry-related bot, designed for the Heraldry Community. Requirements Python 3.9+ discord.py aiohttp (comes installed with discord.py)

1 Mar 31, 2022
Pydf: A modular Telegram Bot which provides Pdf Tools using PyPdf2

pyDF-Bot 🌍 Pydf - Pyrogram Document File Bot, a modular Telegram Bot which prov

HyDrix 2 Feb 18, 2022
Spore REST API asyncio client

Spore REST API asyncio client

LEv145 16 Aug 02, 2022
Info gathering | API hacketarget.com

InfoFetch Info gathering | API hackertarget.com set-up: apt-get install python3 pip3 install requests apt-get install git git clone https://github.com

Muhammed Rizad 4 Nov 22, 2021
Python client for ETAPI of Trilium Note.

Python client for ETAPI of Trilium Note.

33 Dec 31, 2022
A discord bot written in python

arch-bot A discord bot written in python prefix: . help: .help Installation Requirements A discord bot token Your user id Python installed. For window

3 Jan 10, 2022
You can share your Chegg account for answers using this bot with your friends without getting your account blocked/flagged

Chegg-Answer-Bot You can share your Chegg account for answers using this bot with your friends without getting your account blocked/flagged Reuirement

Ammey Saini 27 Dec 24, 2022
Notion API Database Python Implementation

Python Notion Database Notion API Database Python Implementation created only by database from the official Notion API. Installing / Getting started p

minwook 78 Dec 19, 2022
Bitbucket Server API Wrapper

A simple wrapper for the Atlassian's Bitbucket Server / Bitbucket Datacenter (formerly Stash) REST API, written in Python.

Schweitzer Engineering Laboratories 4 Jan 06, 2023
The Discord bot framework for Python

Pycordia ⚠️ Note! As of now, this package is under early development so functionalities are bound to change drastically. We don't recommend you curren

Ángel Carias 24 Jan 01, 2023
Basic Discord python bot

#How to Create a Discord Bot Account In order to work with the Python library and the Discord API, we must first create a Discord Bot account. Here ar

Tustus 1 Oct 13, 2021
Find rare users in discord servers

BadgeScraper Find rare users in discord servers How to use Replace the guild_id, server_id and token by the values you wanna use If you never used dis

20 Dec 09, 2022
Neubot client

Neubot, the network neutrality bot Neubot is a research project on network neutrality of the Nexa Center for Internet & Society at Politecnico di Tori

Neubot 57 Nov 02, 2021
Ever wanted a dashboard for making your antispam? This is it.

Ever wanted a dashboard for making your antispam? This is it.

Skelmis 1 Oct 27, 2021
Wetterdienst - Open weather data for humans

We are a group of like-minded people trying to make access to weather data in Python feel like a warm summer breeze, similar to other projects like rdwd for the R language, which originally drew our

226 Jan 04, 2023