olefile


Nameolefile JSON
Version 0.47 PyPI version JSON
download
home_pagehttps://www.decalage.info/python/olefileio
SummaryPython package to parse, read and write Microsoft OLE2 files (Structured Storage or Compound Document, Microsoft Office)
upload_time2023-12-01 16:22:53
maintainer
docs_urlNone
authorPhilippe Lagadec
requires_python>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            olefile
=======

[![Test](https://github.com/decalage2/olefile/actions/workflows/test.yml/badge.svg)](https://github.com/decalage2/olefile/actions)
[![Build Status AppVeyor](https://ci.appveyor.com/api/projects/status/github/decalage2/olefile?svg=true)](https://ci.appveyor.com/project/decalage2/olefile)
[![codecov](https://codecov.io/gh/decalage2/olefile/branch/main/graph/badge.svg)](https://codecov.io/gh/decalage2/olefile)
[![Documentation Status](http://readthedocs.org/projects/olefile/badge/?version=latest)](http://olefile.readthedocs.io/en/latest/?badge=latest)
[![PyPI](https://img.shields.io/pypi/v/olefile.svg)](https://pypi.org/project/olefile/)
[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/decalage2)

[olefile](https://www.decalage.info/olefile) is a Python package to parse, read and write
[Microsoft OLE2 files](http://en.wikipedia.org/wiki/Compound_File_Binary_Format)
(also called Structured Storage, Compound File Binary Format or Compound Document File Format),
such as Microsoft Office 97-2003 documents, vbaProject.bin in MS Office 2007+ files, Image Composer
and FlashPix files, Outlook messages, StickyNotes, several Microscopy file formats, McAfee antivirus quarantine files,
etc.


**Quick links:** [Home page](https://www.decalage.info/olefile) -
[Download/Install](http://olefile.readthedocs.io/en/latest/Install.html) -
[Documentation](http://olefile.readthedocs.io/en/latest) -
[Report Issues/Suggestions/Questions](https://github.com/decalage2/olefile/issues) -
[Contact the author](https://www.decalage.info/contact) -
[Repository](https://github.com/decalage2/olefile) -
[Updates on Twitter](https://twitter.com/decalage2)


News
----

Follow all updates and news on Twitter: <https://twitter.com/decalage2>

- **2023-12-01 v0.47**: now distributed as wheel package, added VT_VECTOR support for properties,
  added get_userdefined_properties, fixed bugs in isOleFile and write_sect, improved file closure
- 2018-09-09 v0.46: OleFileIO can now be used as a context manager
(with...as), to close the file automatically
(see [doc](https://olefile.readthedocs.io/en/latest/Howto.html#open-an-ole-file-from-disk)).
Improved handling of malformed files, fixed several bugs.
- 2018-01-24 v0.45: olefile can now overwrite streams of any size, improved handling of malformed files,
fixed several [bugs](https://github.com/decalage2/olefile/milestone/4?closed=1), end of support for Python 2.6 and 3.3.
- 2017-01-06 v0.44: several bugfixes, removed support for Python 2.5 (olefile2),
added support for incomplete streams and incorrect directory entries (to read malformed documents),
added getclsid, improved [documentation](http://olefile.readthedocs.io/en/latest) with API reference.
- 2017-01-04: moved the documentation to [ReadTheDocs](http://olefile.readthedocs.io/en/latest)
- 2016-05-20: moved olefile repository to [GitHub](https://github.com/decalage2/olefile)
- 2016-02-02 v0.43: fixed issues [#26](https://github.com/decalage2/olefile/issues/26)
    and [#27](https://github.com/decalage2/olefile/issues/27),
    better handling of malformed files, use python logging.
- see [changelog](https://github.com/decalage2/olefile/blob/master/CHANGELOG.md) for more detailed information and
the latest changes.

Download/Install
----------------

If you have pip or setuptools installed (pip is included in Python 2.7.9+), you may simply run **pip install olefile**
or **easy_install olefile** for the first installation.

To update olefile, run **pip install -U olefile**.

Otherwise, see http://olefile.readthedocs.io/en/latest/Install.html

Features
--------

- Parse, read and write any OLE file such as Microsoft Office 97-2003 legacy document formats (Word .doc, Excel .xls,
    PowerPoint .ppt, Visio .vsd, Project .mpp), MSI files, Image Composer and FlashPix files, Outlook messages, StickyNotes,
    Zeiss AxioVision ZVI files, Olympus FluoView OIB files, etc
- List all the streams and storages contained in an OLE file
- Open streams as files
- Parse and read property streams, containing metadata of the file
- Portable, pure Python module, no dependency

olefile can be used as an independent package or with PIL/Pillow.

olefile is mostly meant for developers. If you are looking for tools to analyze OLE files or to extract data (especially
for security purposes such as malware analysis and forensics), then please also check my
[python-oletools](https://www.decalage.info/python/oletools), which are built upon olefile and provide a higher-level interface.


Documentation
-------------

Please see the [online documentation](http://olefile.readthedocs.io/en/latest) for more information.


## Real-life examples ##

A real-life example: [using OleFileIO_PL for malware analysis and forensics](http://blog.gregback.net/2011/03/using-remnux-for-forensic-puzzle-6/).

See also [this paper](https://computer-forensics.sans.org/community/papers/gcfa/grow-forensic-tools-taxonomy-python-libraries-helpful-forensic-analysis_6879) about python tools for forensics, which features olefile.


License
-------

olefile (formerly OleFileIO_PL) is copyright (c) 2005-2023 Philippe Lagadec
([https://www.decalage.info](https://www.decalage.info))

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


----------

olefile is based on source code from the OleFileIO module of the Python Imaging Library (PIL) published by Fredrik
Lundh under the following license:

The Python Imaging Library (PIL) is

- Copyright (c) 1997-2009 by Secret Labs AB
- Copyright (c) 1995-2009 by Fredrik Lundh

By obtaining, using, and/or copying this software and/or its associated documentation, you agree that you have read,
understood, and will comply with the following terms and conditions:

Permission to use, copy, modify, and distribute this software and its associated documentation for any purpose and
without fee is hereby granted, provided that the above copyright notice appears in all copies, and that both that
copyright notice and this permission notice appear in supporting documentation, and that the name of Secret Labs AB or
the author not be used in advertising or publicity pertaining to distribution of the software without specific, written
prior permission.

SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.



            

Raw data

            {
    "_id": null,
    "home_page": "https://www.decalage.info/python/olefileio",
    "name": "olefile",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
    "maintainer_email": "",
    "keywords": "",
    "author": "Philippe Lagadec",
    "author_email": "nospam@decalage.info",
    "download_url": "https://files.pythonhosted.org/packages/69/1b/077b508e3e500e1629d366249c3ccb32f95e50258b231705c09e3c7a4366/olefile-0.47.zip",
    "platform": null,
    "description": "olefile\n=======\n\n[![Test](https://github.com/decalage2/olefile/actions/workflows/test.yml/badge.svg)](https://github.com/decalage2/olefile/actions)\n[![Build Status AppVeyor](https://ci.appveyor.com/api/projects/status/github/decalage2/olefile?svg=true)](https://ci.appveyor.com/project/decalage2/olefile)\n[![codecov](https://codecov.io/gh/decalage2/olefile/branch/main/graph/badge.svg)](https://codecov.io/gh/decalage2/olefile)\n[![Documentation Status](http://readthedocs.org/projects/olefile/badge/?version=latest)](http://olefile.readthedocs.io/en/latest/?badge=latest)\n[![PyPI](https://img.shields.io/pypi/v/olefile.svg)](https://pypi.org/project/olefile/)\n[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/decalage2)\n\n[olefile](https://www.decalage.info/olefile) is a Python package to parse, read and write\n[Microsoft OLE2 files](http://en.wikipedia.org/wiki/Compound_File_Binary_Format)\n(also called Structured Storage, Compound File Binary Format or Compound Document File Format),\nsuch as Microsoft Office 97-2003 documents, vbaProject.bin in MS Office 2007+ files, Image Composer\nand FlashPix files, Outlook messages, StickyNotes, several Microscopy file formats, McAfee antivirus quarantine files,\netc.\n\n\n**Quick links:** [Home page](https://www.decalage.info/olefile) -\n[Download/Install](http://olefile.readthedocs.io/en/latest/Install.html) -\n[Documentation](http://olefile.readthedocs.io/en/latest) -\n[Report Issues/Suggestions/Questions](https://github.com/decalage2/olefile/issues) -\n[Contact the author](https://www.decalage.info/contact) -\n[Repository](https://github.com/decalage2/olefile) -\n[Updates on Twitter](https://twitter.com/decalage2)\n\n\nNews\n----\n\nFollow all updates and news on Twitter: <https://twitter.com/decalage2>\n\n- **2023-12-01 v0.47**: now distributed as wheel package, added VT_VECTOR support for properties,\n  added get_userdefined_properties, fixed bugs in isOleFile and write_sect, improved file closure\n- 2018-09-09 v0.46: OleFileIO can now be used as a context manager\n(with...as), to close the file automatically\n(see [doc](https://olefile.readthedocs.io/en/latest/Howto.html#open-an-ole-file-from-disk)).\nImproved handling of malformed files, fixed several bugs.\n- 2018-01-24 v0.45: olefile can now overwrite streams of any size, improved handling of malformed files,\nfixed several [bugs](https://github.com/decalage2/olefile/milestone/4?closed=1), end of support for Python 2.6 and 3.3.\n- 2017-01-06 v0.44: several bugfixes, removed support for Python 2.5 (olefile2),\nadded support for incomplete streams and incorrect directory entries (to read malformed documents),\nadded getclsid, improved [documentation](http://olefile.readthedocs.io/en/latest) with API reference.\n- 2017-01-04: moved the documentation to [ReadTheDocs](http://olefile.readthedocs.io/en/latest)\n- 2016-05-20: moved olefile repository to [GitHub](https://github.com/decalage2/olefile)\n- 2016-02-02 v0.43: fixed issues [#26](https://github.com/decalage2/olefile/issues/26)\n    and [#27](https://github.com/decalage2/olefile/issues/27),\n    better handling of malformed files, use python logging.\n- see [changelog](https://github.com/decalage2/olefile/blob/master/CHANGELOG.md) for more detailed information and\nthe latest changes.\n\nDownload/Install\n----------------\n\nIf you have pip or setuptools installed (pip is included in Python 2.7.9+), you may simply run **pip install olefile**\nor **easy_install olefile** for the first installation.\n\nTo update olefile, run **pip install -U olefile**.\n\nOtherwise, see http://olefile.readthedocs.io/en/latest/Install.html\n\nFeatures\n--------\n\n- Parse, read and write any OLE file such as Microsoft Office 97-2003 legacy document formats (Word .doc, Excel .xls,\n    PowerPoint .ppt, Visio .vsd, Project .mpp), MSI files, Image Composer and FlashPix files, Outlook messages, StickyNotes,\n    Zeiss AxioVision ZVI files, Olympus FluoView OIB files, etc\n- List all the streams and storages contained in an OLE file\n- Open streams as files\n- Parse and read property streams, containing metadata of the file\n- Portable, pure Python module, no dependency\n\nolefile can be used as an independent package or with PIL/Pillow.\n\nolefile is mostly meant for developers. If you are looking for tools to analyze OLE files or to extract data (especially\nfor security purposes such as malware analysis and forensics), then please also check my\n[python-oletools](https://www.decalage.info/python/oletools), which are built upon olefile and provide a higher-level interface.\n\n\nDocumentation\n-------------\n\nPlease see the [online documentation](http://olefile.readthedocs.io/en/latest) for more information.\n\n\n## Real-life examples ##\n\nA real-life example: [using OleFileIO_PL for malware analysis and forensics](http://blog.gregback.net/2011/03/using-remnux-for-forensic-puzzle-6/).\n\nSee also [this paper](https://computer-forensics.sans.org/community/papers/gcfa/grow-forensic-tools-taxonomy-python-libraries-helpful-forensic-analysis_6879) about python tools for forensics, which features olefile.\n\n\nLicense\n-------\n\nolefile (formerly OleFileIO_PL) is copyright (c) 2005-2023 Philippe Lagadec\n([https://www.decalage.info](https://www.decalage.info))\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n----------\n\nolefile is based on source code from the OleFileIO module of the Python Imaging Library (PIL) published by Fredrik\nLundh under the following license:\n\nThe Python Imaging Library (PIL) is\n\n- Copyright (c) 1997-2009 by Secret Labs AB\n- Copyright (c) 1995-2009 by Fredrik Lundh\n\nBy obtaining, using, and/or copying this software and/or its associated documentation, you agree that you have read,\nunderstood, and will comply with the following terms and conditions:\n\nPermission to use, copy, modify, and distribute this software and its associated documentation for any purpose and\nwithout fee is hereby granted, provided that the above copyright notice appears in all copies, and that both that\ncopyright notice and this permission notice appear in supporting documentation, and that the name of Secret Labs AB or\nthe author not be used in advertising or publicity pertaining to distribution of the software without specific, written\nprior permission.\n\nSECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR\nCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF\nCONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\nSOFTWARE.\n\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Python package to parse, read and write Microsoft OLE2 files (Structured Storage or Compound Document, Microsoft Office)",
    "version": "0.47",
    "project_urls": {
        "Download": "https://github.com/decalage2/olefile/tarball/master",
        "Homepage": "https://www.decalage.info/python/olefileio"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "17d3b64c356a907242d719fc668b71befd73324e47ab46c8ebbbede252c154b2",
                "md5": "03f6882f1baff0679ffb078ccda77ab1",
                "sha256": "543c7da2a7adadf21214938bb79c83ea12b473a4b6ee4ad4bf854e7715e13d1f"
            },
            "downloads": -1,
            "filename": "olefile-0.47-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "03f6882f1baff0679ffb078ccda77ab1",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
            "size": 114565,
            "upload_time": "2023-12-01T16:22:51",
            "upload_time_iso_8601": "2023-12-01T16:22:51.518738Z",
            "url": "https://files.pythonhosted.org/packages/17/d3/b64c356a907242d719fc668b71befd73324e47ab46c8ebbbede252c154b2/olefile-0.47-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "691b077b508e3e500e1629d366249c3ccb32f95e50258b231705c09e3c7a4366",
                "md5": "d2e73480f90bb473fb5a89c22c8b96af",
                "sha256": "599383381a0bf3dfbd932ca0ca6515acd174ed48870cbf7fee123d698c192c1c"
            },
            "downloads": -1,
            "filename": "olefile-0.47.zip",
            "has_sig": false,
            "md5_digest": "d2e73480f90bb473fb5a89c22c8b96af",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
            "size": 112240,
            "upload_time": "2023-12-01T16:22:53",
            "upload_time_iso_8601": "2023-12-01T16:22:53.025221Z",
            "url": "https://files.pythonhosted.org/packages/69/1b/077b508e3e500e1629d366249c3ccb32f95e50258b231705c09e3c7a4366/olefile-0.47.zip",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-01 16:22:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "decalage2",
    "github_project": "olefile",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "appveyor": true,
    "tox": true,
    "lcname": "olefile"
}
        
Elapsed time: 0.17121s