1olefile 2======= 3 4|Build Status TravisCI| |Build Status AppVeyor| |Coverage Status| 5|Documentation Status| |PyPI| |Can I Use Python 3?| |Say Thanks!| 6 7`olefile <https://www.decalage.info/olefile>`__ is a Python package to 8parse, read and write `Microsoft OLE2 9files <http://en.wikipedia.org/wiki/Compound_File_Binary_Format>`__ 10(also called Structured Storage, Compound File Binary Format or Compound 11Document File Format), such as Microsoft Office 97-2003 documents, 12vbaProject.bin in MS Office 2007+ files, Image Composer and FlashPix 13files, Outlook messages, StickyNotes, several Microscopy file formats, 14McAfee antivirus quarantine files, etc. 15 16**Quick links:** `Home page <https://www.decalage.info/olefile>`__ - 17`Download/Install <http://olefile.readthedocs.io/en/latest/Install.html>`__ 18- `Documentation <http://olefile.readthedocs.io/en/latest>`__ - `Report 19Issues/Suggestions/Questions <https://github.com/decalage2/olefile/issues>`__ 20- `Contact the author <https://www.decalage.info/contact>`__ - 21`Repository <https://github.com/decalage2/olefile>`__ - `Updates on 22Twitter <https://twitter.com/decalage2>`__ 23 24News 25---- 26 27Follow all updates and news on Twitter: https://twitter.com/decalage2 28 29- **2018-09-09 v0.46**: OleFileIO can now be used as a context manager 30 (with...as), to close the file automatically (see 31 `doc <https://olefile.readthedocs.io/en/latest/Howto.html#open-an-ole-file-from-disk>`__). 32 Improved handling of malformed files, fixed several bugs. 33- 2018-01-24 v0.45: olefile can now overwrite streams of any size, 34 improved handling of malformed files, fixed several 35 `bugs <https://github.com/decalage2/olefile/milestone/4?closed=1>`__, 36 end of support for Python 2.6 and 3.3. 37- 2017-01-06 v0.44: several bugfixes, removed support for Python 2.5 38 (olefile2), added support for incomplete streams and incorrect 39 directory entries (to read malformed documents), added getclsid, 40 improved `documentation <http://olefile.readthedocs.io/en/latest>`__ 41 with API reference. 42- 2017-01-04: moved the documentation to 43 `ReadTheDocs <http://olefile.readthedocs.io/en/latest>`__ 44- 2016-05-20: moved olefile repository to 45 `GitHub <https://github.com/decalage2/olefile>`__ 46- 2016-02-02 v0.43: fixed issues 47 `#26 <https://github.com/decalage2/olefile/issues/26>`__ and 48 `#27 <https://github.com/decalage2/olefile/issues/27>`__, better 49 handling of malformed files, use python logging. 50- see 51 `changelog <https://github.com/decalage2/olefile/blob/master/CHANGELOG.md>`__ 52 for more detailed information and the latest changes. 53 54Download/Install 55---------------- 56 57If you have pip or setuptools installed (pip is included in Python 582.7.9+), you may simply run **pip install olefile** or **easy_install 59olefile** for the first installation. 60 61To update olefile, run **pip install -U olefile**. 62 63Otherwise, see http://olefile.readthedocs.io/en/latest/Install.html 64 65Features 66-------- 67 68- Parse, read and write any OLE file such as Microsoft Office 97-2003 69 legacy document formats (Word .doc, Excel .xls, PowerPoint .ppt, 70 Visio .vsd, Project .mpp), Image Composer and FlashPix files, Outlook 71 messages, StickyNotes, Zeiss AxioVision ZVI files, Olympus FluoView 72 OIB files, etc 73- List all the streams and storages contained in an OLE file 74- Open streams as files 75- Parse and read property streams, containing metadata of the file 76- Portable, pure Python module, no dependency 77 78olefile can be used as an independent package or with PIL/Pillow. 79 80olefile is mostly meant for developers. If you are looking for tools to 81analyze OLE files or to extract data (especially for security purposes 82such as malware analysis and forensics), then please also check my 83`python-oletools <https://www.decalage.info/python/oletools>`__, which 84are built upon olefile and provide a higher-level interface. 85 86Documentation 87------------- 88 89Please see the `online 90documentation <http://olefile.readthedocs.io/en/latest>`__ for more 91information. 92 93Real-life examples 94------------------ 95 96A real-life example: `using OleFileIO_PL for malware analysis and 97forensics <http://blog.gregback.net/2011/03/using-remnux-for-forensic-puzzle-6/>`__. 98 99See also `this 100paper <https://computer-forensics.sans.org/community/papers/gcfa/grow-forensic-tools-taxonomy-python-libraries-helpful-forensic-analysis_6879>`__ 101about python tools for forensics, which features olefile. 102 103License 104------- 105 106olefile (formerly OleFileIO_PL) is copyright (c) 2005-2018 Philippe 107Lagadec (https://www.decalage.info) 108 109All rights reserved. 110 111Redistribution and use in source and binary forms, with or without 112modification, are permitted provided that the following conditions are 113met: 114 115- Redistributions of source code must retain the above copyright 116 notice, this list of conditions and the following disclaimer. 117- Redistributions in binary form must reproduce the above copyright 118 notice, this list of conditions and the following disclaimer in the 119 documentation and/or other materials provided with the distribution. 120 121THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 122IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 123TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 124PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 125HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 126SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 127TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 128PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 129LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 130NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 131SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 132 133-------------- 134 135olefile is based on source code from the OleFileIO module of the Python 136Imaging Library (PIL) published by Fredrik Lundh under the following 137license: 138 139The Python Imaging Library (PIL) is 140 141- Copyright (c) 1997-2009 by Secret Labs AB 142- Copyright (c) 1995-2009 by Fredrik Lundh 143 144By obtaining, using, and/or copying this software and/or its associated 145documentation, you agree that you have read, understood, and will comply 146with the following terms and conditions: 147 148Permission to use, copy, modify, and distribute this software and its 149associated documentation for any purpose and without fee is hereby 150granted, provided that the above copyright notice appears in all copies, 151and that both that copyright notice and this permission notice appear in 152supporting documentation, and that the name of Secret Labs AB or the 153author not be used in advertising or publicity pertaining to 154distribution of the software without specific, written prior permission. 155 156SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO 157THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 158FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR 159ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER 160RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF 161CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 162CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 163 164.. |Build Status TravisCI| image:: https://travis-ci.org/decalage2/olefile.svg?branch=master 165 :target: https://travis-ci.org/decalage2/olefile 166.. |Build Status AppVeyor| image:: https://ci.appveyor.com/api/projects/status/github/decalage2/olefile?svg=true 167 :target: https://ci.appveyor.com/project/decalage2/olefile 168.. |Coverage Status| image:: https://coveralls.io/repos/github/decalage2/olefile/badge.svg?branch=master 169 :target: https://coveralls.io/github/decalage2/olefile?branch=master 170.. |Documentation Status| image:: http://readthedocs.org/projects/olefile/badge/?version=latest 171 :target: http://olefile.readthedocs.io/en/latest/?badge=latest 172.. |PyPI| image:: https://img.shields.io/pypi/v/olefile.svg 173 :target: https://pypi.org/project/olefile/ 174.. |Can I Use Python 3?| image:: https://caniusepython3.com/project/olefile.svg 175 :target: https://caniusepython3.com/project/olefile 176.. |Say Thanks!| image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg 177 :target: https://saythanks.io/to/decalage2 178