Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[olevba][oledump.plugin_diff] cannot use a string pattern on a bytes-like object #444

Closed
0xcpu opened this issue May 15, 2019 · 1 comment

Comments

@0xcpu
Copy link

0xcpu commented May 15, 2019

Affected tool:
olevba, oledump

Describe the bug
Inappropriate use of types in a collection search function.

How To Reproduce the bug
olevba file_name

Console output / Screenshots

DEBUG    Checking DirEntry #19
DEBUG    This DirEntry is an orphan or unused
DEBUG    Found Excel stream 'Workbook'
DEBUG    Running BIFF plugin from oledump
ERROR    Error when running oledump.plugin_biff, please report to https://github.com/decalage2/oletools/issues
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/oletools/olevba.py", line 3107, in detect_xlm_macros
    self.xlm_macros = biff_plugin.Analyze()
  File "/usr/local/lib/python3.6/dist-packages/oletools/thirdparty/oledump/plugin_biff.py", line 1005, in Analyze
    values = Strings(data[3:]).values()
  File "/usr/local/lib/python3.6/dist-packages/oletools/thirdparty/oledump/plugin_biff.py", line 84, in Strings
    dStrings[encoding] = StringsASCII(data)
  File "/usr/local/lib/python3.6/dist-packages/oletools/thirdparty/oledump/plugin_biff.py", line 75, in StringsASCII
    return re.findall('[^\x00-\x08\x0A-\x1F\x7F-\xFF]{4,}', data)
  File "/usr/lib/python3.6/re.py", line 222, in findall
    return _compile(pattern, flags).findall(string)
TypeError: cannot use a string pattern on a bytes-like object

Version information:

  • OS: Linux
  • OS version: Ubuntu 18.04.2 LTS 64 bit
  • Python version: 3.6.7 64 bit
  • oletools version: olevba 0.54.2
@decalage2
Copy link
Owner

Fixed in commit 8159c1b

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants