-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't receive Encrypt image #1400
Comments
@Dimelay can you please post the code to simple ignore image messages for now, so it won't break the code? (until someone will solve the problem) |
@yniv Find and modify function There is little time for this. Simple ignore Sorry/ google translate =) |
@Dimelay but maybe we need to send ack anyway? |
@yniv Done! |
yowsup/layers/protocol_media/layer.py def recvMessageStanza(self, node): yowsup/layers/protocol_media/protocolentities/message_media_downloadable.py @staticmethod yowsup/layers/protocol_media/protocolentities/message_media_downloadable_image.py @staticmethod yowsup/layers/protocol_media/protocolentities/message_media.py @staticmethod |
I have this problem, is it the same? ... |
yes |
#1389 you can try solution which i propose here to ignore these scenarios in meanwhile |
@Dimelay could you pls post your code with indentation? Thanks! |
I'm trying to do it |
|
okay fixed |
|
not resolve for me:
|
@bdbais @jlguardi
This makes things conform to the new encrypted XML body, which @Dimelay alluded to, which is something like:
The question is, now we have the encrypted data in value |
This is the full printout from below, with some relevant areas bolded
jhttps://mmi263.whatsapp.net/d/X5lGvQhVridh8JNjJ1cRTlb0UBk/AomynskcHiGNoLNiIC9qfyPYsnDBZGK_CxMYe1aDbZVG.enc ���}!1AQa"q2��#B��R��$3br� ���w!1AQaq"2B���� #3R�br� """"""''''',,,,,,,,,,��C ...................................................���� |
trying to figure out how to just make this work in the axolotl layer. so far i've changed handleEncMessage to something like this:
|
@bdbais You use yowsup-cli.py or written by you script ?
Now, if I get the picture, my script does not crash and gives the message
|
i'm not trying to just ignore the case when a message is received, i'm actually trying to fix the problem. my use case for this requires the ability to receive images. that's why this issue is a bug.. |
|
I'm using a script based on echoclient for receiving media from users, but now I can't use it. |
yes, you are right, that is what we are trying to fix. don't know how to properly decrypt the media message |
OK, I got to see a preview of the image. |
@Dimelay that sounds like it'd work - can you post the code here? |
ok, i see what yuo're saying. i'm doing something like this:
|
@payamazadi @Dimelay I've gotten preview of the image and I've partially ported chatAPI in my branch (https://github.com/jlguardi/yowsup/tree/encrypted_media) As you can see, it produces still an exception but preview node is correct. I have printed to a file and works. Now, I'm trying to use protobuf to read all other fields (url is possible without protobuf but we need all other fields to decrypt remote file). |
@jlguardi are you saying without protobuf the contents of the .enc file that gets downloaded can't be fully decrypted? do you have any idea what the file structure is?.. |
@payamazadi Step by step... I've fully read encrypted message content: url, caption... So I'll decrypt file but I need time/help for that. |
I'm using transwhat with yowsup. I can send messages, get also ackn. My debug of transwhat doesn't show that much. Am 25.03.2016 um 18:20 schrieb jlguardi:
|
Open a new issue and post logs of yowsup-cli with your credentials in debug mode. |
never used cli..... will try it. how to enable the debug mode? Am 25.03.2016 um 18:36 schrieb jlguardi:
|
yowsup-cli demos -y -d -l phonewithcc:password |
Am 25.03.2016 um 18:52 schrieb jlguardi:
|
@thundergreen group encrypted messages aren't supported yet. |
@jlguardi i've been having an issue w the branch around axolotl's layer, and the handlePreKeyWhisperMessage function. can you do me a favor and run the echo client and tell me if you get errors? when the layer sends the media message to handlePreKeyWhisperMessage function, with the code exactly how it is in the encrypted-media branch, and i run the echo client, i get infinite output, looks like this: when i essentially replicate the actions of handlePreKeyWhisperMessage into handleWhisperMessage, things seem to work fine. my workaround is this:
by the way, there is also an error being thrown (somewhere, due to a logger.debug line) because the node's file attribute was not being set. i added that line in. you may want to commit that to the branch |
@payamazadi Ups I read now your comment. Meet me at IRC (yowsup@chat.noip.me) if you prefer. |
btw, great work on this refactor, it works great now out of the box with the echo demo and the code is pretty clean. i can help refactor some of that too |
hey guys @payamazadi @jlguardi what is the branch to be used? |
hey guys can u please help ? which branch should be used? |
Tomorrow I'll share my code. I do not use yowsup-cli. I use my cli. I write only for personal use, but I can share code. |
Screenshot ) It is very convenient to use with the phone via ssh |
New version with media and group messages!!! There are too many issues and I don't know where to report. My branch https://github.com/jlguardi/yowsup/ works with personal/group text/media. Sending isn't encrypted in groups but works with plain send. Test it and enjoy it (if it works). |
@jlguardi which patch fix receiving encrypted image? |
@jlguardi Great stuff! Many thanks for your great efforts. |
@jodersus master. See my wiki for some details. |
Hoping this will fix issues with encrypted media described in tgalal#1400 and others..
@jlguardi I am using your master currently. Could you tell me how to decrypt downloaded media files? |
@bartoszhernas message.getMediaContent() returns unencrypted media but just images work for now, WIP. |
@jlguardi You are a life saver. Thanks a lot. Will check it out |
Receiving of decrypted images is no more possible. All receveid images are still encrypted, implemented your method message.getMediaContent(). Are there any open issues? |
Are there any open issues? All receveid images are still encrypted in most recent branch... |
Hello guys, So is there any piece of news? Is it possible now to open the decrypted images? |
So, what needs to be done to get all of this trogether? |
v3.2.0 |
File "/home/steck/whatsappMy/yowsup/yowsup/layers/protocol_media/layer.py", line 41, in recvMessageStanza
DATAif mediaNode.getAttributeValue("type") == "image":
AttributeError: 'NoneType' object has no attribute 'getAttributeValue'
Decrypt body:
yowsup/layers/axolotl/layer.py:
def handleWhisperMessage(self, node):
encMessageProtocolEntity = EncryptedMessageProtocolEntity.fromProtocolTreeNode(node)
Link to my file
https://mmi488.whatsapp.net/d/0QVa5QLVNRiH0HZ_gU-W5FbzX-4/AhbVJi2WS1Yia7EklnoFua1fwMezYiqzH4BQsv53_63Z.enc ┴�K\←c��� *�/R���Zc�T㡪Z│ܒM���O·�┘┌��±b�c�H�─�π─U��┌\└ǎ�K91b��←?:◆�;±�⎺��cM&RF���_�M��1���┤4?���d��K'E��̏�<C�5��⎼HI5��c�z����+�H!�IЂ��JFIFHH�XExifMM�i&��d�d�8Photoshop 3.08BIM8BIM%�ُ��B~�dd"�
�·B���c�U≥─��π�]Ѝ⎽��┘�ι:��Z#�1����TA↓cQ��S�ĩ°�S/c��B←▒�
��n/��HǢK$$����cVf����РG��rK1$�ߧ����@Wa�����L�bk�A�.�B�_x1ҽ���
%&'()_456789:CDEFGHIJSTUV
How to decrypt the file now?
The text was updated successfully, but these errors were encountered: