Giter Club home page Giter Club logo

opendocument-security's Introduction

OpenDocument Security

Build Status Python 3.5|3.9 License

OpenDocument security toolbox

Prerequisites

pip3 install -r requirements.txt

Usage

# Example with classic OpenDocument
$ python opendocument_security.py examples/vba-nested-ole.odt
> Parsing OpenDocument examples/vba-nested-ole.odt
> This OpenDocument contains macro !
  > Object 2/Basic/Standard/TEST.xml
  > Object 2/Basic/Standard/script-lb.xml
  > Basic/Standard/TEST.xml
  > Basic/Standard/script-lb.xml
> Entering in content.xml
  > Found event listener: {'{http://www.w3.org/1999/xlink}href': 'vnd.sun.star.script:Standard.TEST.Flag?language=Basic&location=document', '{http://www.w3.org/1999/xlink}type': 'simple', '{urn:oasis:names:tc:opendocument:xmlns:script:1.0}language': 'ooo:script', '{urn:oasis:names:tc:opendocument:xmlns:script:1.0}event-name': 'dom:load'}
  > Found event listener: {'{http://www.w3.org/1999/xlink}href': 'vnd.sun.star.script:Standard.TEST.Flag?language=Basic&location=document', '{http://www.w3.org/1999/xlink}type': 'simple', '{urn:oasis:names:tc:opendocument:xmlns:script:1.0}language': 'ooo:script', '{urn:oasis:names:tc:opendocument:xmlns:script:1.0}event-name': 'office:save'}
  > Entering in Object 1/content.xml
  > Exiting Object 1/content.xml
  > Entering in Object 2/content.xml
    > Found event listener: {'{http://www.w3.org/1999/xlink}href': 'vnd.sun.star.script:Standard.TEST.Flag?language=Basic&location=document', '{http://www.w3.org/1999/xlink}type': 'simple', '{urn:oasis:names:tc:opendocument:xmlns:script:1.0}language': 'ooo:script', '{urn:oasis:names:tc:opendocument:xmlns:script:1.0}event-name': 'dom:load'}
    > Found event listener: {'{http://www.w3.org/1999/xlink}href': 'vnd.sun.star.script:Standard.TEST.Flag?language=Basic&location=document', '{http://www.w3.org/1999/xlink}type': 'simple', '{urn:oasis:names:tc:opendocument:xmlns:script:1.0}language': 'ooo:script', '{urn:oasis:names:tc:opendocument:xmlns:script:1.0}event-name': 'office:save'}
  > Exiting Object 2/content.xml
> Exiting content.xml
> Closing OpenDocument examples/vba-nested-ole.odt


# Example with Flat OpenDocument
$ python opendocument_security.py examples/only-ole-object.fodt
> Parsing Flat OpenDocument examples/only-ole-object.fodt
> This Flat OpenDocument contains macro !
  > [<Element '{http://openoffice.org/2004/office}library-embedded' at 0x7f416deec950>]
> Entering in examples/only-ole-object.fodt
  > Found event listener: {'{urn:oasis:names:tc:opendocument:xmlns:script:1.0}language': 'ooo:script', '{urn:oasis:names:tc:opendocument:xmlns:script:1.0}event-name': 'dom:load', '{http://www.w3.org/1999/xlink}href': 'vnd.sun.star.script:Standard.Module1.Flag?language=Basic&location=document', '{http://www.w3.org/1999/xlink}type': 'simple'}
  > Found event listener: {'{urn:oasis:names:tc:opendocument:xmlns:script:1.0}language': 'ooo:script', '{urn:oasis:names:tc:opendocument:xmlns:script:1.0}event-name': 'office:save', '{http://www.w3.org/1999/xlink}href': 'vnd.sun.star.script:Standard.Module1.Flag?language=Basic&location=document', '{http://www.w3.org/1999/xlink}type': 'simple'}
> Exiting examples/only-ole-object.fodt
> Closing Flat OpenDocument examples/only-ole-object.fodt

License

Licensed under the Apache License, Version 2.0 (the "License").

Copyright

Copyright 2020-2023 Nicolas BEGUIER; (nbeguier - nicolas_beguier[at]hotmail[dot]com)

opendocument-security's People

Contributors

dependabot[bot] avatar nbeguier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

opendocument-security's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.