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

fix: ppt file with pictures #35

Merged
merged 4 commits into from
Aug 7, 2024
Merged

Conversation

guillenotfound
Copy link
Contributor

As per the reference implementation in Python: https://github.com/nolze/msoffcrypto-tool/blob/85ff05be8c057dac51fcd5b12f15fc438df5f1ab/msoffcrypto/format/ppt97.py#L798

The original streams are copied and replaced with the newly decrypted ones.

With this fix in place I'm able to visualize the file in pdftron, but this fix won't fix the fact that the original file and the resulting one will be different and we won't be able to visualize images in the decrypted ppt file, that's something I don't know how to fix, I guess we need to apply decryption in chunks for the pictures stream?

image

pwd: Password@123
ppt.zip

@zurmokeeper zurmokeeper self-assigned this Aug 6, 2024
@zurmokeeper
Copy link
Owner

@guillenotfound It's possible, I used WPS to decrypt the encrypted file you gave me, and after I decrypted it, I got a different 'Pictures' stream in the file than when it was encrypted, so it's possible that something was done here.

@zurmokeeper
Copy link
Owner

@guillenotfound #19 This issue mentions the decryption of ppt Pictures stream, there is a partial implementation of golang, maybe it will help you, if it can inspire you to finish decrypting ppt Pictures stream, PR will be perfect.

@zurmokeeper
Copy link
Owner

@guillenotfound

Would it be possible to guillenotfound:patch-2 branch to synchronize the latest main branch first? I'm afraid that there will be a conflict during the PR merge.

@guillenotfound
Copy link
Contributor Author

@guillenotfound

Would it be possible to guillenotfound:patch-2 branch to synchronize the latest main branch first? I'm afraid that there will be a conflict during the PR merge.

Done! I cannot promise I'll be able to add images support, but if we get a complete code snippet I'll be happy to try :)

At least this one will allow rendering in some platforms even if we don't see the images (we'll have parity with Python script)

@zurmokeeper zurmokeeper merged commit 9a8d1cd into zurmokeeper:main Aug 7, 2024
@zurmokeeper zurmokeeper added the bug Something isn't working label Aug 7, 2024
@zurmokeeper
Copy link
Owner

@guillenotfound v0.0.16 Released

@guillenotfound guillenotfound deleted the patch-2 branch August 13, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants