pyarmor
pyarmor copied to clipboard
[BUG] Obfuscate with SPP mode: TypeError: string indices must be integers
Pyarmor version: 7.6.2
Simple classes:
foo.py
class Foo:
def hello(self, name):
print("hello {}".format(name))
bar.py
from foo import Foo
class Bar:
def __init__(self):
self.foo = Foo()
if __name__ == '__main__':
bar = Bar()
bar.foo.hello("Pyarmor in SPP")
Obfuscate with: --advanced 2
pyarmor -d obfuscate --advanced 2 bar.py && python3 ./dist/bar.py
Working fine with result:
hello Pyarmor in SPP
Obfuscate with: --advanced 5
pyarmor -d obfuscate --advanced 5 bar.py && python3 ./dist/bar.py
Throws exception
File "</workspace/test/./dist/bar.py>", line 2, in <module>
File "<frozen bar>", line 57, in <module>
File "<frozen bar>", line 49, in protect_pytransform
File "<frozen bar>", line 35, in spp_caller
TypeError: string indices must be integers
I reproduce it in Windows by Python3.8, I'll check it.
Fix it in pre-release pip install https://pyarmor.dashingsoft.com/downloads/temp/pyarmor-7.7.0.zip
Fixed in v7.7.0