Fix proto2 extension field handling and improve dumper compatibility with recent Keynote versions (e.g. Keynote 15)#68
Open
flokru wants to merge 2 commits intopsobot:masterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what 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.
While updating to Keynote 15.1.1 (the latest Keynote as of now), I ran into two bugs that prevented both unpacking
.keyfiles and runningdumper/run.py. This PR fixes both, along with a README update to bring the Updates section in line with the current tooling.Changes
keynote_parser/codec.py— Fix KeyError on proto2 extension fieldsProtobufPatch.apply()assumed all field numbers indiff_field_pathare present infields_by_number. However, fields defined via proto2extendblocks are not regular message fields and are absent fromfields_by_number. This caused aKeyErrorwhen unpacking files containing such fields, which appear in Keynote 15.The fix looks up extension fields via
descriptor_pool.Default().FindExtensionByNumber()when the field number is not found infields_by_number.dumper/run.py— Two compatibility fixesExecutable name derived from
Info.plistinstead of the bundle foldername. Recent Keynote is distributed as
Keynote 2025.appbut its binary isnamed
Keynote, causing the codesign and re-sign steps to fail with"No such file or directory".
Ad-hoc signing fallback when no local codesigning identity is available.
The script previously raised an error requiring users to create a certificate
in Keychain Access.
codesign -s -(ad-hoc signing) is sufficient for LLDBto attach to the process and requires no certificate setup.
README.md— UpdatedUpdatessectionThe
make-based instructions were outdated. Replaced with the currentdumper/run.py-based workflow including prerequisites, the correct Python interpreter requirement for LLDB compatibility, and other notes for first-time users.Testing
Tested on macOS with Keynote 15.1.1 ("Keynote 2025"). Both
unpackandpackwork correctly on.keyfiles generated by this version.Transparency
This fix was developed with the help of Claude Code.