Commit 169ef5051759a346baf7691bf40b2cb8169c53a0
1 parent
951b436c
ftguess: added PowerPoint content-types
Showing
1 changed file
with
15 additions
and
4 deletions
oletools/ftguess.py
| ... | ... | @@ -645,24 +645,28 @@ class FType_Powerpoint2007_Presentation(FType_Powerpoint2007): |
| 645 | 645 | filetype = FTYPE.POWERPOINT2007_PPTX |
| 646 | 646 | name = 'MSPowerpoint 2007+ Presentation' |
| 647 | 647 | longname = 'MSPowerpoint 2007+ Presentation (.pptx)' |
| 648 | + content_types = ('application/vnd.openxmlformats-officedocument.presentationml.presentation',) | |
| 648 | 649 | extensions = ['pptx'] |
| 649 | 650 | |
| 650 | 651 | class FType_Powerpoint2007_Slideshow(FType_Powerpoint2007): |
| 651 | 652 | filetype = FTYPE.POWERPOINT2007_PPSX |
| 652 | 653 | name = 'MSPowerpoint 2007+ Slideshow' |
| 653 | 654 | longname = 'MSPowerpoint 2007+ Slideshow (.ppsx)' |
| 655 | + content_types = ('application/vnd.openxmlformats-officedocument.presentationml.slideshow',) | |
| 654 | 656 | extensions = ['ppsx'] |
| 655 | 657 | |
| 656 | 658 | class FType_Powerpoint2007_Macro(FType_Powerpoint2007): |
| 657 | 659 | filetype = FTYPE.POWERPOINT2007_PPTM |
| 658 | 660 | name = 'MSPowerpoint 2007+ Macro-Enabled Presentation' |
| 659 | 661 | longname = 'MSPowerpoint 2007+ Macro-Enabled Presentation (.pptm)' |
| 662 | + content_types = ('application/vnd.ms-powerpoint.presentation.macroEnabled.12',) | |
| 660 | 663 | extensions = ['pptm'] |
| 661 | 664 | |
| 662 | 665 | class FType_Powerpoint2007_Slideshow_Macro(FType_Powerpoint2007): |
| 663 | 666 | filetype = FTYPE.POWERPOINT2007_PPSM |
| 664 | 667 | name = 'MSPowerpoint 2007+ Macro-Enabled Slideshow' |
| 665 | 668 | longname = 'MSPowerpoint 2007+ Macro-Enabled Slideshow (.ppsm)' |
| 669 | + content_types = ('application/vnd.ms-powerpoint.slideshow.macroEnabled.12',) | |
| 666 | 670 | extensions = ['ppsm'] |
| 667 | 671 | |
| 668 | 672 | |
| ... | ... | @@ -752,12 +756,19 @@ openxml_ftypes = { |
| 752 | 756 | 'application/vnd.ms-excel.template.macroEnabled.main+xml': FType_Excel2007_Template_Macro, |
| 753 | 757 | 'application/vnd.ms-excel.addin.macroEnabled.main+xml': FType_Excel2007_Addin_Macro, |
| 754 | 758 | # POWERPOINT |
| 755 | - 'application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml': FType_Powerpoint2007_Presentation, | |
| 756 | - 'application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml': FType_Powerpoint2007_Slideshow, | |
| 757 | - 'application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml': FType_Powerpoint2007_Macro, | |
| 758 | - 'application/vnd.ms-powerpoint.slideshow.macroEnabled.main+xml': FType_Powerpoint2007_Slideshow_Macro, | |
| 759 | + 'application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml': FType_Powerpoint2007_Presentation, #PPTX | |
| 760 | + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml': FType_Powerpoint2007_Slideshow, #PPSX | |
| 761 | + 'application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml': FType_Powerpoint2007_Macro, #PPTM | |
| 762 | + 'application/vnd.ms-powerpoint.slideshow.macroEnabled.main+xml': FType_Powerpoint2007_Slideshow_Macro, #PPSM | |
| 763 | + | |
| 764 | + # TODO: add missing PowerPoint formats: | |
| 765 | + # PPAM โ PowerPoint Add-in Open Office XML File Format. Mime type is application/vnd.ms-powerpoint.addin.macroEnabled.12. | |
| 766 | + # POTX โ PowerPoint Template Open Office XML File Format. Mime type is application/vnd.openxmlformats-officedocument.presentationml.template. | |
| 767 | + # POTM โ PowerPoint Macro-Enabled Template Open Office XML File Format. Mime type is application/vnd.ms-powerpoint.template.macroEnabled.12. | |
| 768 | + | |
| 759 | 769 | # XPS |
| 760 | 770 | 'application/vnd.ms-package.xps-fixeddocumentsequence+xml': FType_XPS, |
| 771 | + #TODO: Add MSIX | |
| 761 | 772 | } |
| 762 | 773 | |
| 763 | 774 | ... | ... |