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,24 +645,28 @@ class FType_Powerpoint2007_Presentation(FType_Powerpoint2007): | ||
| 645 | filetype = FTYPE.POWERPOINT2007_PPTX | 645 | filetype = FTYPE.POWERPOINT2007_PPTX |
| 646 | name = 'MSPowerpoint 2007+ Presentation' | 646 | name = 'MSPowerpoint 2007+ Presentation' |
| 647 | longname = 'MSPowerpoint 2007+ Presentation (.pptx)' | 647 | longname = 'MSPowerpoint 2007+ Presentation (.pptx)' |
| 648 | + content_types = ('application/vnd.openxmlformats-officedocument.presentationml.presentation',) | ||
| 648 | extensions = ['pptx'] | 649 | extensions = ['pptx'] |
| 649 | 650 | ||
| 650 | class FType_Powerpoint2007_Slideshow(FType_Powerpoint2007): | 651 | class FType_Powerpoint2007_Slideshow(FType_Powerpoint2007): |
| 651 | filetype = FTYPE.POWERPOINT2007_PPSX | 652 | filetype = FTYPE.POWERPOINT2007_PPSX |
| 652 | name = 'MSPowerpoint 2007+ Slideshow' | 653 | name = 'MSPowerpoint 2007+ Slideshow' |
| 653 | longname = 'MSPowerpoint 2007+ Slideshow (.ppsx)' | 654 | longname = 'MSPowerpoint 2007+ Slideshow (.ppsx)' |
| 655 | + content_types = ('application/vnd.openxmlformats-officedocument.presentationml.slideshow',) | ||
| 654 | extensions = ['ppsx'] | 656 | extensions = ['ppsx'] |
| 655 | 657 | ||
| 656 | class FType_Powerpoint2007_Macro(FType_Powerpoint2007): | 658 | class FType_Powerpoint2007_Macro(FType_Powerpoint2007): |
| 657 | filetype = FTYPE.POWERPOINT2007_PPTM | 659 | filetype = FTYPE.POWERPOINT2007_PPTM |
| 658 | name = 'MSPowerpoint 2007+ Macro-Enabled Presentation' | 660 | name = 'MSPowerpoint 2007+ Macro-Enabled Presentation' |
| 659 | longname = 'MSPowerpoint 2007+ Macro-Enabled Presentation (.pptm)' | 661 | longname = 'MSPowerpoint 2007+ Macro-Enabled Presentation (.pptm)' |
| 662 | + content_types = ('application/vnd.ms-powerpoint.presentation.macroEnabled.12',) | ||
| 660 | extensions = ['pptm'] | 663 | extensions = ['pptm'] |
| 661 | 664 | ||
| 662 | class FType_Powerpoint2007_Slideshow_Macro(FType_Powerpoint2007): | 665 | class FType_Powerpoint2007_Slideshow_Macro(FType_Powerpoint2007): |
| 663 | filetype = FTYPE.POWERPOINT2007_PPSM | 666 | filetype = FTYPE.POWERPOINT2007_PPSM |
| 664 | name = 'MSPowerpoint 2007+ Macro-Enabled Slideshow' | 667 | name = 'MSPowerpoint 2007+ Macro-Enabled Slideshow' |
| 665 | longname = 'MSPowerpoint 2007+ Macro-Enabled Slideshow (.ppsm)' | 668 | longname = 'MSPowerpoint 2007+ Macro-Enabled Slideshow (.ppsm)' |
| 669 | + content_types = ('application/vnd.ms-powerpoint.slideshow.macroEnabled.12',) | ||
| 666 | extensions = ['ppsm'] | 670 | extensions = ['ppsm'] |
| 667 | 671 | ||
| 668 | 672 | ||
| @@ -752,12 +756,19 @@ openxml_ftypes = { | @@ -752,12 +756,19 @@ openxml_ftypes = { | ||
| 752 | 'application/vnd.ms-excel.template.macroEnabled.main+xml': FType_Excel2007_Template_Macro, | 756 | 'application/vnd.ms-excel.template.macroEnabled.main+xml': FType_Excel2007_Template_Macro, |
| 753 | 'application/vnd.ms-excel.addin.macroEnabled.main+xml': FType_Excel2007_Addin_Macro, | 757 | 'application/vnd.ms-excel.addin.macroEnabled.main+xml': FType_Excel2007_Addin_Macro, |
| 754 | # POWERPOINT | 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 | # XPS | 769 | # XPS |
| 760 | 'application/vnd.ms-package.xps-fixeddocumentsequence+xml': FType_XPS, | 770 | 'application/vnd.ms-package.xps-fixeddocumentsequence+xml': FType_XPS, |
| 771 | + #TODO: Add MSIX | ||
| 761 | } | 772 | } |
| 762 | 773 | ||
| 763 | 774 |