psobot / keynote-parser

A packer/unpacker for Apple Keynote presentation files.
158 stars 17 forks source link

Try Keynote(14.0) and failed. #57

Open daddygongon opened 7 months ago

daddygongon commented 7 months ago

I just made a simple sample.key on Keynote(14.0), and unpack it but failed.

> keynote-parser unpack sample.key 
Traceback (most recent call last):
  File "/Users/bob/opt/anaconda3/bin/keynote-parser", line 5, in <module>
    from keynote_parser.command_line import main
  File "/Users/bob/opt/anaconda3/lib/python3.8/site-packages/keynote_parser/command_line.py", line 12, in <module>
    from .file_utils import process
  File "/Users/bob/opt/anaconda3/lib/python3.8/site-packages/keynote_parser/file_utils.py", line 22, in <module>
    from .codec import IWAFile
  File "/Users/bob/opt/anaconda3/lib/python3.8/site-packages/keynote_parser/codec.py", line 15, in <module>
    from .mapping import NAME_CLASS_MAP, ID_NAME_MAP
  File "/Users/bob/opt/anaconda3/lib/python3.8/site-packages/keynote_parser/mapping.py", line 5, in <module>
    from .generated import KNArchives_pb2 as KNArchives
  File "/Users/bob/opt/anaconda3/lib/python3.8/site-packages/keynote_parser/generated/KNArchives_pb2.py", line 15, in <module>
    from . import TSPMessages_pb2 as TSPMessages__pb2
  File "/Users/bob/opt/anaconda3/lib/python3.8/site-packages/keynote_parser/generated/TSPMessages_pb2.py", line 22, in <module>
    google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(field_options)
AttributeError: type object 'FieldOptions' has no attribute 'RegisterExtension'

Do you have some trick?

masaccio commented 7 months ago

Peter will need to regenerate the protobuf files for 14.0 to work. Sadly this is the way with how we extract data from iWork documents.

@psobot looks like the list of breakpoints in extract_mapping.py isn't sufficient for iWork 14.0 apps.

masaccio commented 7 months ago

Actually false alarm on that - my signing entitlements were breaking. Your dump script still works.

vinaykudari commented 2 months ago

@masaccio were you able to generate protobuf files get the parser working for 14?

masaccio commented 2 months ago

Yes this still works up to and including 14.2. My copy is not materially different. It works best if you have an Apple Developer certificate and resign a copy of the application with your own certificate. You don’t need to disable Apple’s security settings when doing this as long as you enable debug using entitlements like these.