From 4d9182e6584b6cf632e9ef497252375a3645dcc6 Mon Sep 17 00:00:00 2001 From: Sébastien Larinier Date: Mon, 12 Sep 2016 11:30:06 +0200 Subject: [PATCH] modify import to package oletools --- oletools/olevba3.py | 12 ++++++------ oletools/ppt_parser.py | 2 +- setup.py | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/oletools/olevba3.py b/oletools/olevba3.py index 9fb0e76..bd1ade3 100755 --- a/oletools/olevba3.py +++ b/oletools/olevba3.py @@ -244,15 +244,15 @@ 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 \ +import oletools.thirdparty.olefile as olefile +from oletools.thirdparty.prettytable import prettytable +from oletools.thirdparty.xglob import xglob, PathNotFoundException +from oletools.thirdparty.pyparsing.pyparsing import \ CaselessKeyword, CaselessLiteral, Combine, Forward, Literal, \ Optional, QuotedString,Regex, Suppress, Word, WordStart, \ alphanums, alphas, hexnums,nums, opAssoc, srange, \ infixNotation -import ppt_parser +import oletools.ppt_parser as ppt_parser # monkeypatch email to fix issue #32: # allow header lines without ":" @@ -1814,7 +1814,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 oletools.thirdparty.DridexUrlDecoder.DridexUrlDecoder import DridexUrlDecode results = [] found = set() diff --git a/oletools/ppt_parser.py b/oletools/ppt_parser.py index e89a037..a36867d 100644 --- a/oletools/ppt_parser.py +++ b/oletools/ppt_parser.py @@ -37,7 +37,7 @@ import struct import traceback import os -import thirdparty.olefile as olefile +import oletools.thirdparty.olefile as olefile import zlib diff --git a/setup.py b/setup.py index b0c13d5..5ca369a 100755 --- a/setup.py +++ b/setup.py @@ -285,11 +285,11 @@ entry_points = { def main(): # TODO: remove this test once all tools are ported to Python 3 # TODO: warning about Python 2.6 - if sys.version >= '3.0': - s = "Sorry, %s %s requires Python 2.x." - print(s % (name, version)) - sys.exit(1) -## if sys.version < required_python_version: +# if sys.version >= '3.0': +# s = "Sorry, %s %s requires Python 2.x." +# print(s % (name, version)) +# sys.exit(1) +# ## if sys.version < required_python_version: ## s = "I'm sorry, but %s %s requires Python %s or later." ## print(s % (name, version, required_python_version)) ## sys.exit(1) -- libgit2 0.21.4