Open PedroFcul opened 6 years ago
jlguardi's fork features the getMediaContent
method. As I recall, it was never merged into tgalal's repository and therefore is missing in this one. Please mind that this implementation of media decryption has been observed to be unreliable, especially in group chats.
ok i've done it, but it doesn't work on any other files (ex: .txt), is there a way to decrypt and download files?
same here. it would be great to been able to test it in the command line also before entering to add more code.
This should be working if you checkout the latest code. The PR from a couple of weeks ago added this, all media is now saved to /tmp/yowfiles/
folder.
@PedroFcul work for you? For me working ok. close the issue if ok
Using AragurDEV's latest build I tried various format. This is my result Text in: ok Text out: ok
Image in: message received, but url points to encrypted filed Image out: ok
Video in: Message is received, but attachment is encrypted Video out: nothing happens
Audio in: Message is received, but attachment is encrypted Audio out: not yet tested
Document in: nothing happens .txt: “[Media Type: document]” is received, but no additional information (e.g. url)
Docoument out: pdf: “Exception: Unable to get page count. Is poppler installed and in PATH?” popler installed with “brew install poppler” -> ok Localtion out: ok Location in: Message MediaType: location, but no other information
VCard out: ok VCard in: “[Media Type: document]”, but no other information
--
So in genereal the incoming files will show as .enc and are not automatically decrypted. Is there anything I'm missing?
@markus7017 You are right.
Encryption of incoming media is still not implemented yet.
Do you know this link? https://www.quora.com/How-can-I-decrypt-an-encrypted-WhatsApp-file
There is a program by AndreasM, which at least can decrypt database file: https://www.quora.com/How-do-you-decrypt-WhatsApp-message-files. Would that help?
I have another question. Does you repo include all/most available patches? It seems that the master repo is no linger maintained.
fyi: I’m working on a WhatsApp binding for openHAB V2 (ome automation) based on yowsup. I already switched to your fork :-) https://community.openhab.org/t/whatsapp-aka-yowsup-helper-functions/12517/34?u=markus7017
i can receive messages in format media with your code and i get this output
[Media Type:image, Size:286168, URL:b'https://mmg.whatsapp.net/d/f/..........enc']
now how do i decrypt and download the image into my filesystem?