diff --git a/oletools/ezhexviewer.py b/oletools/ezhexviewer.py index aef233b..d2a1abc 100644 --- a/oletools/ezhexviewer.py +++ b/oletools/ezhexviewer.py @@ -54,7 +54,7 @@ __version__ = '0.50' # + options to set title and msg -from thirdparty.easygui import easygui +from .thirdparty.easygui import easygui import sys # === PYTHON 2+3 SUPPORT ====================================================== @@ -154,4 +154,4 @@ def main(): if __name__ == '__main__': - main() \ No newline at end of file + main() diff --git a/oletools/mraptor.py b/oletools/mraptor.py index ee35654..921f213 100644 --- a/oletools/mraptor.py +++ b/oletools/mraptor.py @@ -66,8 +66,8 @@ __version__ = '0.51' import sys, logging, optparse, re -from thirdparty.xglob import xglob -from thirdparty.tablestream import tablestream +from .thirdparty.xglob import xglob +from .thirdparty.tablestream import tablestream import olevba diff --git a/oletools/mraptor3.py b/oletools/mraptor3.py index d74cf58..4d0edf7 100644 --- a/oletools/mraptor3.py +++ b/oletools/mraptor3.py @@ -63,13 +63,13 @@ __version__ = '0.50py3' import sys, logging, optparse, re -from thirdparty.xglob import xglob +from .thirdparty.xglob import xglob # import the python 3 version of tablestream: -from thirdparty.tablestream import tablestream +from .thirdparty.tablestream import tablestream # import the python 3 version of olevba -import olevba3 as olevba +from . import olevba3 as olevba # === LOGGING ================================================================= diff --git a/oletools/olebrowse.py b/oletools/olebrowse.py index ba2e3dc..ed387d1 100644 --- a/oletools/olebrowse.py +++ b/oletools/olebrowse.py @@ -52,9 +52,9 @@ __version__ = '0.02' # - stream info: magic, entropy, ... ? import optparse, sys, os -from thirdparty.easygui import easygui -import thirdparty.olefile as olefile -import ezhexviewer +from .thirdparty.easygui import easygui +from .thirdparty import olefile +from . import ezhexviewer ABOUT = '~ About olebrowse' QUIT = '~ Quit' diff --git a/oletools/olemap.py b/oletools/olemap.py index e8b8489..a42d47a 100644 --- a/oletools/olemap.py +++ b/oletools/olemap.py @@ -52,8 +52,8 @@ __version__ = '0.50' # === IMPORTS ================================================================ import sys -from thirdparty.olefile import olefile -from thirdparty.tablestream import tablestream +from .thirdparty.olefile import olefile +from .thirdparty.tablestream import tablestream diff --git a/oletools/olemeta.py b/oletools/olemeta.py index 1ad0abd..b366da7 100644 --- a/oletools/olemeta.py +++ b/oletools/olemeta.py @@ -60,8 +60,8 @@ __version__ = '0.50' #=== IMPORTS ================================================================= import sys, codecs -import thirdparty.olefile as olefile -from thirdparty.tablestream import tablestream +import .thirdparty import olefile +from .thirdparty.tablestream import tablestream #=== MAIN ================================================================= @@ -117,4 +117,4 @@ def main(): ole.close() if __name__ == '__main__': - main() \ No newline at end of file + main() diff --git a/oletools/oleobj.py b/oletools/oleobj.py index 50a48ff..3463563 100644 --- a/oletools/oleobj.py +++ b/oletools/oleobj.py @@ -70,8 +70,8 @@ __version__ = '0.51' import logging, struct, optparse, os, re, sys -from thirdparty.olefile import olefile -from thirdparty.xglob import xglob +from .thirdparty.olefile import olefile +from .thirdparty.xglob import xglob # === LOGGING ================================================================= diff --git a/oletools/oletimes.py b/oletools/oletimes.py index 5970c8c..0dd5aa8 100644 --- a/oletools/oletimes.py +++ b/oletools/oletimes.py @@ -61,8 +61,8 @@ __version__ = '0.50' #=== IMPORTS ================================================================= import sys, datetime -import thirdparty.olefile as olefile -from thirdparty.prettytable import prettytable +from .thirdparty import olefile +from .thirdparty.prettytable import prettytable # === MAIN =================================================================== diff --git a/oletools/olevba.py b/oletools/olevba.py index a4bcac8..ce7dc97 100644 --- a/oletools/olevba.py +++ b/oletools/olevba.py @@ -256,15 +256,16 @@ except ImportError: + "see http://codespeak.net/lxml " \ + "or http://effbot.org/zone/element-index.htm") -import thirdparty.olefile as olefile -from thirdparty.prettytable import prettytable -from thirdparty.xglob import xglob, PathNotFoundException -from thirdparty.pyparsing.pyparsing import \ +from .thirdparty import olefile +from .thirdparty.prettytable import prettytable +from .thirdparty.xglob import xglob, PathNotFoundException +from .thirdparty.pyparsing.pyparsing import \ CaselessKeyword, CaselessLiteral, Combine, Forward, Literal, \ Optional, QuotedString,Regex, Suppress, Word, WordStart, \ alphanums, alphas, hexnums,nums, opAssoc, srange, \ infixNotation, ParserElement -import ppt_parser +from . import ppt_parser + # monkeypatch email to fix issue #32: # allow header lines without ":" @@ -1886,7 +1887,7 @@ def detect_dridex_strings(vba_code): :param vba_code: str, VBA source code :return: list of str tuples (encoded string, decoded string) """ - from thirdparty.DridexUrlDecoder.DridexUrlDecoder import DridexUrlDecode + from .thirdparty.DridexUrlDecoder.DridexUrlDecoder import DridexUrlDecode results = [] found = set() diff --git a/oletools/pyxswf.py b/oletools/pyxswf.py index 00a974e..c6b6030 100644 --- a/oletools/pyxswf.py +++ b/oletools/pyxswf.py @@ -74,10 +74,11 @@ __version__ = '0.50' #=== IMPORTS ================================================================= -import optparse, sys, os, rtfobj +import optparse, sys, os +from . import rtfobj from io import BytesIO -from thirdparty.xxxswf import xxxswf -import thirdparty.olefile as olefile +from .thirdparty.xxxswf import xxxswf +from .thirdparty import olefile #=== MAIN ================================================================= diff --git a/oletools/rtfobj.py b/oletools/rtfobj.py index a68c011..0c2ea57 100644 --- a/oletools/rtfobj.py +++ b/oletools/rtfobj.py @@ -83,12 +83,10 @@ __version__ = '0.51' import re, os, sys, binascii, logging, optparse import os.path -from thirdparty.xglob import xglob -from oleobj import OleObject, OleNativeStream -import oleobj - -from thirdparty.tablestream import tablestream - +from .thirdparty.xglob import xglob +from .thirdparty.tablestream import tablestream +from .oleobj import OleObject, OleNativeStream +from . import oleobj # === LOGGING =================================================================