whatsapp-web-reveng
whatsapp-web-reveng copied to clipboard
whatsappWriteBinary error
Traceback (most recent call last):
File "send.py", line 437, in
["action", {"epoch": "14", "type": "relay"},[{"status": "PENDING", "message": {"conversation": "hello"}, "key": {"remoteJid": "[email protected]", "fromMe": True, "id": "3EB06FD60499245EBD85"}, "messageTimestamp": "1577523727"}]]
i can't make whatsappWriteBinary() for this json ????
messageTag = str(getTimestamp()) param = {"status": "PENDING", "message": {"conversation": "hello"}, "key": {"remoteJid": "[email protected]", "fromMe": True, "id": "3EB05581DCD50E0A5B89"}, "messageTimestamp": "1577532498"} TXT = ["action", {"epoch": "11", "type": "relay"}, [WAWebMessageInfo.encode(param)]] payload = bytearray(to_bytes(16, 1)) + bytearray([0x80]) first = base64.b64encode(whatsappWriteBinary(TXT));
im used this code
I have the same issue, it looks like some data is not supported, for example when loading or sending messages (I tested in a group).
Here is an example of the data when sending a message to a group:
['action', {'epoch': '2', 'type': 'relay'}, [{u'status': u'PENDING', u'message': {u'conversation': u'test 0123456789'}, u'key': {u'remoteJid': u'[email protected]', u'fromMe': True, u'id': u'XXX'}, u'messageTimestamp': u'XXX'}]]
I have a test script here (you just need to configure the variables at the top of the file, comment the decryptedMessage lines and uncomment the encryptedMessage lines at the end of the file):
https://pastebin.com/hNBeEqgv
Does someone have an idea how to fix the issue?
Maybe this other project does not have the issue in libs/whatsapp_write.py, I did not test yet: https://github.com/romanzaikin/BurpExtension-WhatsApp-Decryption-CheckPoint/tree/master/helper
I noticed that the data that fails is like u'XXX', the u is maybe what is causing the problem in my case and the other project is doing something like .replace("u'","'") (doing just this is not enough but they are using a variable char_diff also).