Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

How to save image decrypted in the file system? #10

Open
PedroFcul opened this issue Oct 3, 2017 · 8 comments
Open

How to save image decrypted in the file system? #10

PedroFcul opened this issue Oct 3, 2017 · 8 comments

Comments

@PedroFcul
Copy link

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?

@hoehermann
Copy link

hoehermann commented Oct 24, 2017

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.

@PedroFcul
Copy link
Author

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?

@hgc2002
Copy link

hgc2002 commented Dec 2, 2017

same here. it would be great to been able to test it in the command line also before entering to add more code.

@mikesalmonuk
Copy link

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.

@pabloruan0710
Copy link

@PedroFcul work for you? For me working ok. close the issue if ok

@markus7017
Copy link

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?

@Aragur
Copy link
Owner

Aragur commented Dec 3, 2018

@markus7017 You are right.
Encryption of incoming media is still not implemented yet.

@markus7017
Copy link

markus7017 commented Dec 3, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants