Bug: syntax error in obfuscated code when using multi-line string literals
Code to replicate the issue:
print("This is a very very very long string argument "
"splitted in two lines to demonstrate a bug")
or even:
s = ("This is a very very very long string argument "
"splitted in two lines to demonstrate a bug")
print(s)
This is valid Python code. After obfuscation, the code contains a syntax error:
File "../code_opy/test.py", line 18
l1l1lll1_opy_ (u"ࠨࡳࡱࡸࡹࡤࠡࡱࠤࡲࡵࡲࡦࠢࡳࡳࠣࡤ"))
^
SyntaxError: invalid syntax
The same happens putting "\" at the end of every line.
I am not sure I can make Opy's simplistic parser understand this. But I'll look into it. Thanks for the feedback!
Still no good solution to this. Haven't completely given up, though.
I found a similar question:
name = 'Eric' print(f'Hello, my name is {name}')
This is valid Python code. After obfuscation, the code contains a syntax error:
name = l11l1_opy_ (u"ࠫࡊࡸࡩࡤࠩࠀ") print(l11ll_opy_ (u"ࠬࡎࡥࡲ࠰ࠥࡳࡹࠡࡰࡤࡱࡪࠦࡩࡴࠢࡾࡲࡦࡳࡥࡾࠩࠁ"))
cause a error:
print(l11ll_opy_ (u"ࠬࡎࡥࡲ࠰ࠥࡳࡹࠡࡰࡤࡱࡪࠦࡩࡴࠢࡾࡲࡦࡳࡥࡾࠩࠁ")) NameError: name 'l11ll_opy_' is not defined