Commit 4d9182e6584b6cf632e9ef497252375a3645dcc6

Authored by Sébastien Larinier
1 parent 1af6975e

modify import to package oletools

oletools/olevba3.py
... ... @@ -244,15 +244,15 @@ except ImportError:
244 244 + "see http://codespeak.net/lxml " \
245 245 + "or http://effbot.org/zone/element-index.htm")
246 246  
247   -import thirdparty.olefile as olefile
248   -from thirdparty.prettytable import prettytable
249   -from thirdparty.xglob import xglob, PathNotFoundException
250   -from thirdparty.pyparsing.pyparsing import \
  247 +import oletools.thirdparty.olefile as olefile
  248 +from oletools.thirdparty.prettytable import prettytable
  249 +from oletools.thirdparty.xglob import xglob, PathNotFoundException
  250 +from oletools.thirdparty.pyparsing.pyparsing import \
251 251 CaselessKeyword, CaselessLiteral, Combine, Forward, Literal, \
252 252 Optional, QuotedString,Regex, Suppress, Word, WordStart, \
253 253 alphanums, alphas, hexnums,nums, opAssoc, srange, \
254 254 infixNotation
255   -import ppt_parser
  255 +import oletools.ppt_parser as ppt_parser
256 256  
257 257 # monkeypatch email to fix issue #32:
258 258 # allow header lines without ":"
... ... @@ -1814,7 +1814,7 @@ def detect_dridex_strings(vba_code):
1814 1814 :param vba_code: str, VBA source code
1815 1815 :return: list of str tuples (encoded string, decoded string)
1816 1816 """
1817   - from thirdparty.DridexUrlDecoder.DridexUrlDecoder import DridexUrlDecode
  1817 + from oletools.thirdparty.DridexUrlDecoder.DridexUrlDecoder import DridexUrlDecode
1818 1818  
1819 1819 results = []
1820 1820 found = set()
... ...
oletools/ppt_parser.py
... ... @@ -37,7 +37,7 @@ import struct
37 37 import traceback
38 38 import os
39 39  
40   -import thirdparty.olefile as olefile
  40 +import oletools.thirdparty.olefile as olefile
41 41 import zlib
42 42  
43 43  
... ...
setup.py
... ... @@ -285,11 +285,11 @@ entry_points = {
285 285 def main():
286 286 # TODO: remove this test once all tools are ported to Python 3
287 287 # TODO: warning about Python 2.6
288   - if sys.version >= '3.0':
289   - s = "Sorry, %s %s requires Python 2.x."
290   - print(s % (name, version))
291   - sys.exit(1)
292   -## if sys.version < required_python_version:
  288 +# if sys.version >= '3.0':
  289 +# s = "Sorry, %s %s requires Python 2.x."
  290 +# print(s % (name, version))
  291 +# sys.exit(1)
  292 +# ## if sys.version < required_python_version:
293 293 ## s = "I'm sorry, but %s %s requires Python %s or later."
294 294 ## print(s % (name, version, required_python_version))
295 295 ## sys.exit(1)
... ...