Skip to content
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

node version #52

Open
jabolina opened this issue Dec 6, 2018 · 6 comments
Open

node version #52

jabolina opened this issue Dec 6, 2018 · 6 comments

Comments

@jabolina
Copy link
Contributor

jabolina commented Dec 6, 2018

I was using the whalesong installing it with pip, but this was creating a lot of communicatino between other js modules I have running in my project. So, I want to ask if its ok to you if I create a simple Whalesong version (monitor messages and chats in the beginning), using
you js script working with puppeteer?

I'll create a repo and publish in npm for others to use it, if it's ok.

@alfred82santa
Copy link
Owner

It's perfect. In fact it is one of my todo's #39

@jabolina
Copy link
Contributor Author

jabolina commented Dec 6, 2018

Thanks! I'll add you as a collaborator, I'll be maintaining the repo, trying to keep up with the python version.

@jabolina
Copy link
Contributor Author

Hi, I'm having some trouble with media messages decryption, this one. Can you say what was the logic?

Thanks!

@alfred82santa
Copy link
Owner

Well, I copied this code from tgalal/yowsup#1449 (comment)

But, more or less, this is the description:

L771: Download file
L776: Get media key from message. Fill with '=' in order to complete b64 string (multiple of 3)
L779: Compose crypto token (https://signal.org/docs/specifications/doubleratchet/#double-ratchet)
L785: Split crypto token in order to get IV and KEY (https://github.com/tgalal/python-axolotl/blob/master/axolotl/util/byteutil.py#L26)
L788: Remove last 10 bytes from file (I'm not sure why...)
L790: Create decryptor with IV and KEY
L792: Decrypt (AES-CBC: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation) file and finalize (Maybe finalize is about last 10 bytes...)

@alfred82santa
Copy link
Owner

@jabolina
Copy link
Contributor Author

Thanks, that works perfectly!

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

No branches or pull requests

2 participants