原文(original text):
问题挺简单的,就是不支持Python的隐式字符串拼接。目前是使用多行隐式字符串拼接进行测试的,比如下面这个例子:
test_string = (
"你好"
"世界"
)
按理来说,test_string会被Python解释器拼接为"你好世界"这一行字符串,中间不需要显式添加符号。但将代码交给Opy混淆后,可能就会变成下面这个样子
l1ll1111ll1l11_opy_ = (
l11lllll1_opy_ (u"……")
l11lllll1_opy_ (u"……")
)
很明显,经Opy处理后,Python解释器不再能理解这种表达式,所以会直接报出语法错误,正确的处理方式应该是显式添加合并符,或者是合并后再加密,例如:
l1ll1111ll1l11_opy_ = (
l11lllll1_opy_ (u"......" ) +
l11lllll1_opy_ (u"......" )
))
或
l1ll1111ll1l11_opy_ = (
l11lllll1_opy_ (u"......(我不确定合并后他们会变成什么)" )
)
希望这个问题能被修复。
English:
The problem is quite simple. It's the lack of support for implicit string concatenation in Python. Currently, we are testing it using multi-line implicit string concatenation, such as in the following example:
test_string = (
"Hello "
"World"
)
According to theory, the "test_string" would be concatenated by the Python interpreter into the line string "Hello World", without the need for explicit addition of symbols in the middle. However, when the code is handed over to Opy obfuscation, it might become something like this:
l1ll1111ll1l11_opy_ = (
l11lllll1_opy_ (u"……" )
l11lllll1_opy_ (u"……" )
)
Obviously, after being processed by Opy, the Python interpreter can no longer understand this expression, so it will directly report a syntax error. The correct approach should be to explicitly add the merge symbol, or to merge and then encrypt, for example:
l1ll1111ll1l11_opy_ = (
l11lllll1_opy_ (u"……" ) +
l11lllll1_opy_ (u"……" )
)
or
l1ll1111ll1l11_opy_ = (
l11lllll1_opy_ (u"……(I'm not sure what they will become after the merger)" )
)
Hope this issue can be fixed.
原文(original text):
问题挺简单的,就是不支持Python的隐式字符串拼接。目前是使用多行隐式字符串拼接进行测试的,比如下面这个例子:
按理来说,test_string会被Python解释器拼接为"你好世界"这一行字符串,中间不需要显式添加符号。但将代码交给Opy混淆后,可能就会变成下面这个样子
很明显,经Opy处理后,Python解释器不再能理解这种表达式,所以会直接报出语法错误,正确的处理方式应该是显式添加合并符,或者是合并后再加密,例如:
或
希望这个问题能被修复。
English:
The problem is quite simple. It's the lack of support for implicit string concatenation in Python. Currently, we are testing it using multi-line implicit string concatenation, such as in the following example:
According to theory, the "test_string" would be concatenated by the Python interpreter into the line string "Hello World", without the need for explicit addition of symbols in the middle. However, when the code is handed over to Opy obfuscation, it might become something like this:
Obviously, after being processed by Opy, the Python interpreter can no longer understand this expression, so it will directly report a syntax error. The correct approach should be to explicitly add the merge symbol, or to merge and then encrypt, for example:
or
Hope this issue can be fixed.