Commit a047549005a18647e9380afab4e7c48a67028311

Authored by decalage2
1 parent 437fdad9

sync olevba and olevba3 (work in progress)

Showing 1 changed file with 2 additions and 2 deletions
oletools/olevba.py
... ... @@ -3006,7 +3006,7 @@ class VBA_Parser(object):
3006 3006 log.debug('%r...[much more data]...%r' % (data[:100], data[-50:]))
3007 3007 else:
3008 3008 log.debug(repr(data))
3009   - if 'Attribut\x00' in data:
  3009 + if b'Attribut\x00' in data:
3010 3010 log.debug('Found VBA compressed code')
3011 3011 self.contains_macros = True
3012 3012 except IOError as exc:
... ... @@ -3073,7 +3073,7 @@ class VBA_Parser(object):
3073 3073 # read data
3074 3074 log.debug('Reading data from stream %r' % d.name)
3075 3075 data = ole._open(d.isectStart, d.size).read()
3076   - for match in re.finditer(r'\x00Attribut[^e]', data, flags=re.IGNORECASE):
  3076 + for match in re.finditer(b'\\x00Attribut[^e]', data, flags=re.IGNORECASE):
3077 3077 start = match.start() - 3
3078 3078 log.debug('Found VBA compressed code at index %X' % start)
3079 3079 compressed_code = data[start:]
... ...