All Projects → p4kl0nc4t → kyros

p4kl0nc4t / kyros

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

Programming Languages

HTML
75241 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to kyros

python-automated-bulk-whatsapp-messages
It is a python script to send automated bulk WhatsApp messages to multiple recipients from an excel sheet at once.
Stars: ✭ 56 (-40.43%)
Mutual labels:  whatsapp, whatsapp-automation
whatsapp-http-api
WhatsApp HTTP API that you can configure in a click!
Stars: ✭ 229 (+143.62%)
Mutual labels:  whatsapp, whatsapp-automation
Whatsapp Bot
BOT - WhatsApp Web in TypeScript
Stars: ✭ 170 (+80.85%)
Mutual labels:  whatsapp
Ferdi
🧔🏽 Ferdi helps you organize how you use your favourite apps by combining them into one application
Stars: ✭ 4,089 (+4250%)
Mutual labels:  whatsapp
Whatsdump
Extract WhatsApp private key from any non-rooted Android device (Android 7+ supported)
Stars: ✭ 198 (+110.64%)
Mutual labels:  whatsapp
Re Whatsapp
Reverse engineering WhatsApp. Documentation and protocols.
Stars: ✭ 184 (+95.74%)
Mutual labels:  whatsapp
Altus
Desktop client for WhatsApp Web with themes, notifications and multiple account support
Stars: ✭ 203 (+115.96%)
Mutual labels:  whatsapp
Code for fun
Some of my scripts to automate the boring stuff around me
Stars: ✭ 167 (+77.66%)
Mutual labels:  whatsapp
Whatsappui
WhatsApp UI in Xamarin.Forms
Stars: ✭ 251 (+167.02%)
Mutual labels:  whatsapp
Whatsapp Assistant Bot
A personal WhatsApp assistant bot that will help you search anything on the web (Google, Images, Google Maps)
Stars: ✭ 198 (+110.64%)
Mutual labels:  whatsapp
Whapp Irc
whatsapp web <-> irc gateway
Stars: ✭ 208 (+121.28%)
Mutual labels:  whatsapp
Tindroid
Tinode chat client application for Android
Stars: ✭ 194 (+106.38%)
Mutual labels:  whatsapp
Whatsappbetaupdater
An app to update WhatsApp to the latest beta version available on Android. Based on Material Design.
Stars: ✭ 183 (+94.68%)
Mutual labels:  whatsapp
Forensic Tools
A collection of tools for forensic analysis
Stars: ✭ 204 (+117.02%)
Mutual labels:  whatsapp
Tock
Tock - the open source conversational AI toolkit
Stars: ✭ 175 (+86.17%)
Mutual labels:  whatsapp
Watusi For Whatsapp
Your all-in-one tweak for WhatsApp Messenger!
Stars: ✭ 240 (+155.32%)
Mutual labels:  whatsapp
Whatsapp Web.js
A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
Stars: ✭ 4,103 (+4264.89%)
Mutual labels:  whatsapp
Watoi
Whatsapp Android To iOS Importer
Stars: ✭ 189 (+101.06%)
Mutual labels:  whatsapp
Manageyum
A browser made precisely for your apps.
Stars: ✭ 199 (+111.7%)
Mutual labels:  whatsapp
Recordview
A Simple Audio Recorder View with "hold to Record Button" and "Swipe to Cancel " Like WhatsApp
Stars: ✭ 253 (+169.15%)
Mutual labels:  whatsapp

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]/p4kl0nc4t/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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].