ReFirmLabs / binwalk

Firmware Analysis Tool
MIT License
10.35k stars 1.49k forks source link

raw string should be used #664

Open xambroz opened 7 months ago

xambroz commented 7 months ago

For this regex raw string should be used, otherwise it has pontential at some version of python to match "." literally any character.

xambroz commented 7 months ago

Based on compilation with python 3.12: /usr/lib/python3.12/site-packages/binwalk/core/magic.py:431: SyntaxWarning: invalid escape sequence '.' self.period = re.compile(".")