Skip to content

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

@0xcpu

Description

@0xcpu

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions