README.rst 8.1 KB

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