• This repository has been archived on 02/Nov/2023
  • Stars
    star
    102
  • Rank 328,549 (Top 7 %)
  • Language
    HTML
  • License
    MIT License
  • Created about 4 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python wrapper for WhatsApp Web API websocket communication (based on https://github.com/sigalor/whatsapp-web-reveng)

Important Note

This project is no longer maintained. As per this commit, I decided not to maintain the project anymore. Since last year, WhatsApp has been making many changes (most notably the offline feature) that directly affected this project. I have been so busy that I can't keep up with the pace, and I don't plan to continue it in the future either.

Thanks to anyone who has been using and/or helping with the development of this project.

If someone wants to continue the project (e.g.Β by making a fork), I would appreciate that.

Kyros

Kyros, for now, is a Python interface to communicate easier with WhatsApp Web API. It provides an interface to connect and communicate with WhatsApp Web's websocket server. Kyros will handle encryption and decryption kind of things. In the future, Kyros is aimed to provide a full implementation of WhatsApp Web API which will give developers a clean interface to work with (more or less like go-whatsapp). This module is designed to work with Python 3.6 or latest. Special thanks to the creator of whatsapp-web-reveng and go-whatsapp. This project is largely motivated by their work. Please note that Kyros is not meant to be used actively in production servers as it is currently not production ready. Use it at your own risk.

Installation

Kyros could be installed by using pip or directly cloning it then invoking setup.py. For example, if you want to use pip, run the following command:

pip install git+https://[email protected]/ttycelery/kyros

Documentation

A simple example

import asyncio
import logging

import pyqrcode

import kyros

logging.basicConfig()
# set a logging level: just to know if something (bad?) happens
logging.getLogger("kyros").setLevel(logging.WARNING)

async def main():
    # create the Client instance using create class method
    whatsapp = await kyros.Client.create()

    # do a QR login
    qr_data, scanned = await whatsapp.qr_login()

    # generate qr code image
    qr_code = pyqrcode.create(qr_data)
    print(qr_code.terminal(quiet_zone=1))

    try:
        # wait for the QR code to be scanned
        await scanned
    except asyncio.TimeoutError:
        # timed out (left unscanned), do a shutdown
        await whatsapp.shutdown()
        return

    # how to send a websocket message
    message = kyros.WebsocketMessage(None, ["query", "exist", "[email protected]"])
    await whatsapp.websocket.send_message(message)

    # receive a websocket message
    print(await whatsapp.websocket.messages.get(message.tag))


if __name__ == "__main__":
    asyncio.run(main())

A "much more detailed documentation" kind of thing for this project is available here. You will see a piece of nightmare, happy exploring! Better documentation are being planned.

Contribution

This work is still being slowly developed. Your contribution will of course make the development process of this project even faster. Any kind of contribution is highly appreciated.

License

This project is licensed with MIT License.

Disclaimer

This 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.

More Repositories

1

Spammer-Grab

A brand new, awakened version of the old Spammer-Grab.
Python
210
star
2

wabf

WhatsApp number bruteforcer. (Ab)uses WhatsApp Web API.
Python
29
star
3

praesentia

Simple Python-based web application to allow UGM students to fill their QR presence list without having another device in hand.
Python
22
star
4

lcat.dev

My personal website project. Perhaps yours too?
Python
19
star
5

simaster.ics

Simple web API to generate an iCalendar file from SIMASTER courses schedule.
Python
11
star
6

bni-api

A Python wrapper for some of BNI's internet banking functionalities.
Python
10
star
7

f609-brute

Simple brute force tool for Telkom Indonesia's ZTE F609 routers
Python
9
star
8

iceberg

WhatsApp chatbot for school assignment management.
Go
8
star
9

ExamKill

Monitor and kill ExamBrowser process to bypass its restriction
Python
8
star
10

culpint

Web interface for Recon-ng
HTML
8
star
11

shtem

PHP based short-term memory.
PHP
6
star
12

battleship

A simple C++ guessing game
C++
6
star
13

bangunin

Go-based web app which functions as a call-based alarm.
Go
6
star
14

fssh

A fake SSH client written in C
C
4
star
15

wmsync

A program written in C to synchronize Telkom Indonesia's WiFi Managed Service (WMS) internet connection.
C
4
star
16

lcat-testing

Repository of /testing dir in lcat.dev, serves as a testing site for everything (xss, sqli, etc.)
PHP
3
star
17

ambi

Study friend matchmaking app (a project for Google 2022 Solution Challenge)
JavaScript
3
star
18

p4kl0nc4t.github.io

GitHub Pages for hosting project documentations.
HTML
2
star
19

un2sent

Python version of improved SalsaQ LINE bot
Python
1
star
20

costine-backend

A back-end infrastructure for the Costine mobile app
Python
1
star
21

integrivote

Flask-based voting web application.
HTML
1
star
22

shepp

JavaScript
1
star
23

pytag

A simple Python-based computer-assisted qualitative data analysis software (CAQDAS)
Python
1
star
24

dockurr

Simple container-as-a-service using Docker Engine and Flask
Python
1
star
25

p4kl0nc4t

A repository for my GitHub profile description
1
star