{"action":"created","issue":{"url":"https://api.github.com/repos/tgalal/yowsup/issues/1400","repository_url":"https://api.github.com/repos/tgalal/yowsup","labels_url":"https://api.github.com/repos/tgalal/yowsup/issues/1400/labels{/name}","comments_url":"https://api.github.com/repos/tgalal/yowsup/issues/1400/comments","events_url":"https://api.github.com/repos/tgalal/yowsup/issues/1400/events","html_url":"https://github.com/tgalal/yowsup/issues/1400","id":143143095,"number":1400,"title":"Can't receive Encrypt image","user":{"login":"Dimelay","id":18041537,"avatar_url":"https://avatars.githubusercontent.com/u/18041537?v=3","gravatar_id":"","url":"https://api.github.com/users/Dimelay","html_url":"https://github.com/Dimelay","followers_url":"https://api.github.com/users/Dimelay/followers","following_url":"https://api.github.com/users/Dimelay/following{/other_user}","gists_url":"https://api.github.com/users/Dimelay/gists{/gist_id}","starred_url":"https://api.github.com/users/Dimelay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dimelay/subscriptions","organizations_url":"https://api.github.com/users/Dimelay/orgs","repos_url":"https://api.github.com/users/Dimelay/repos","events_url":"https://api.github.com/users/Dimelay/events{/privacy}","received_events_url":"https://api.github.com/users/Dimelay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":92,"created_at":"2016-03-24T03:54:45Z","updated_at":"2016-03-30T15:12:11Z","closed_at":null,"body":"  File \"/home/steck/whatsappMy/yowsup/yowsup/layers/protocol_media/layer.py\", line 41, in recvMessageStanza\r\n    if mediaNode.getAttributeValue(\"type\") == \"image\":\r\nAttributeError: 'NoneType' object has no attribute 'getAttributeValue'\r\n \r\n<message type=\"media\" notify=\"Дмитрий\" from=\"79021732240@s.whatsapp.net\" id=\"4942644B6537BDC4A3\" t=\"1458780467\">\r\n<enc type=\"msg\" mediatype=\"image\" v=\"2\">\r\nDATA\r\n</enc>\r\n\r\nDecrypt body:\r\nyowsup/layers/axolotl/layer.py:\r\n\r\ndef handleWhisperMessage(self, node):\r\n        encMessageProtocolEntity = EncryptedMessageProtocolEntity.fromProtocolTreeNode(node)\r\n\r\n        whisperMessage = WhisperMessage(serialized=encMessageProtocolEntity.getEncData())\r\n        sessionCipher = self.getSessionCipher(encMessageProtocolEntity.getFrom(False))\r\n        plaintext = sessionCipher.decryptMsg(whisperMessage)\r\n        if encMessageProtocolEntity.getVersion() == 2:\r\n            plaintext = self.unpadV2Plaintext(plaintext)\r\n        //PRINT DECRYPT BODY\r\n        print plaintext\r\n        //\r\n        bodyNode = ProtocolTreeNode(\"body\", data = plaintext)\r\n        node.addChild(bodyNode)\r\n        self.toUpper(node)\r\nLink to my file\r\nhttps://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\"�\r\n�·B���c�U≥─��π�]Ѝ⎽��┘�ι:��Z#�1����TA↓cQ��S�ĩ°�S/c��B←▒�\r\n��n/��HǢK$$����cVf����РG��rK1$�ߧ�׿���@WA�����L�bk�A�.�B�*x1ҽ���\r\n%&'()*456789:CDEFGHIJSTUV\r\n\r\nHow to decrypt the file now?"},"comment":{"url":"https://api.github.com/repos/tgalal/yowsup/issues/comments/203482277","html_url":"https://github.com/tgalal/yowsup/issues/1400#issuecomment-203482277","issue_url":"https://api.github.com/repos/tgalal/yowsup/issues/1400","id":203482277,"user":{"login":"jlguardi","id":10707343,"avatar_url":"https://avatars.githubusercontent.com/u/10707343?v=3","gravatar_id":"","url":"https://api.github.com/users/jlguardi","html_url":"https://github.com/jlguardi","followers_url":"https://api.github.com/users/jlguardi/followers","following_url":"https://api.github.com/users/jlguardi/following{/other_user}","gists_url":"https://api.github.com/users/jlguardi/gists{/gist_id}","starred_url":"https://api.github.com/users/jlguardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlguardi/subscriptions","organizations_url":"https://api.github.com/users/jlguardi/orgs","repos_url":"https://api.github.com/users/jlguardi/repos","events_url":"https://api.github.com/users/jlguardi/events{/privacy}","received_events_url":"https://api.github.com/users/jlguardi/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T15:12:11Z","updated_at":"2016-03-30T15:12:11Z","body":"@bartoszhernas message.getMediaContent() returns unencrypted media but just images work for now, WIP. "}}