Open
Conversation
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".
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what
7452
appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?