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

Decrypt in oleobj #798

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

christian-intra2net
Copy link
Contributor

@christian-intra2net christian-intra2net commented Nov 29, 2022

Corrected the branch name, assuming github would manage to update the pull request associated with it

This is a re-creation of PR #464:

Integrated decrypt in oleobj.

This has 2 effects:
(1) can extract images and other embedded files from encrypted files
(2) treat the decrypted version of the file like an "extracted object"

Second one is for people (like me) who use oleobj as a general-purpose extractor of content from ole-files (much like ripOLE). This way, we can run e.g. an antivirus software over the decrypted/extracted contents.

Or should I maybe make (2) optional via command line switch?

Imrove readability by making main() smaller
Move selection of output dir to main(), creation to point just before
it is actually needed. This way, we only create the dir when (and if)
it is actually needed.
Create wrapper around process_file, that first just runs process_file
but afterwards checks for encryption and re-runs on decrypted file if
encryption found.
Usually, decrypted files are treated like temp files, deleted after use.
Here, these are part of the result of oleobj, just like an extracted image.
Check decryption capability of oleobj. Created this sample in Word 2010 by
embedding a jpg into the office file and then encrypting the file with the
standard password used for "write protection".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants