sigalor / whatsapp-web-reveng

Reverse engineering WhatsApp Web.
MIT License
6.1k stars 802 forks source link

send Message #69

Open reny122010 opened 6 years ago

reny122010 commented 6 years ago

I'm trying to implement the messaging part, but my knowledge regarding this type of project is very small, do you have alpha idea of ​​how does the way data encryption work? after encrypted just send via websoket send? Do you have any idea of ​​the structure of sending the message?

wiomoc commented 6 years ago

Well maybe you find something useful in the go implementation https://github.com/Rhymen/go-whatsapp or in my rust implementation https://github.com/wiomoc/whatsappweb-rs which both supports message sending

valga commented 6 years ago

@wiomoc @Rhymen You missed one thing: message ID must start with 3EB0.

wiomoc commented 6 years ago

@valga I saw this also in the code of WhatsApp web, but Whatsapp accepts other IDs, not beginning with 3EB0 too

valga commented 6 years ago

@wiomoc Then you should add a warning message to your repo, because people might end up with getting banned by WA.

wiomoc commented 6 years ago

@valga I've just implemented the correct message id generation

sigalor commented 6 years ago

For reference, the 3E80 part is defined in the dfahgfjgfj module of the original WhatsApp Web source code. Apparently, the entire id is supposed to be 10 bytes long, i.e. 8 random bytes follow the 3E80.

Rhymen commented 6 years ago

Thank you for telling us,I guess we are going to change to the same ID generation. We don't want to pretend to be WhatsApp Web tho. In the login request (short/long BrowserDescription) we even tell them our repository name and url. I'm pretty sure that we produced some errors while testing and implementing the package and I don't want to cause trouble for the WhatsApp devs when they look at the logs. Furthermore it's easy to use WhatsApp Web with e.g. Selenium and I'm pretty sure they already know about all the whatspp reverse engeneering thats happening.

tiwarishrijan commented 5 years ago

Duplicate of #65