liftoff / pyminifier

Pyminifier is a Python code minifier, obfuscator, and compressor.
GNU General Public License v3.0
1.45k stars 223 forks source link

SyntaxError: invalid character in identifier #53

Open seosi opened 8 years ago

seosi commented 8 years ago

I used pyminifier as follow :

python3 /usr/local/bin/pyminifier --obfuscate-builtins -O --nonlatin --replacement-length=128 test.py > test_pyminifier.py

When I try to run test_pyminifier :

python3 test_pyminifier.py File "test_pyminifier.py", line 2 ﰾ撆㻢זּ𐰑ﲄݥﲗﮦ𩊢𢄟ﳬ𡸋鶣ﴚ𡷨𠗧ܘ𪷢𪻡ݴﻝ𩝦뤊𩳘ࡒﰽࠍܠ뤌ﲑ𢕌莢㿭ﯞﵛ𐤓ﲉ𓉄𨧈𐡆𣧱ڮ邃𐨫珛𐦴𩎶崏𐨨𐭭𐠢𥐘ڲ왾ﺋ𢘐ࠒ琡𐑫ڀ𠚺𦬊㚃ﭼ륀ឝ𩍏ﻲꏮﷆگ𞺑ﯚ旺𤕑𠪢𞺱䒿𢢲𐦉ﱧ𐨮𐬤هﳤ𞸮ﴍ𣓩ﰠ𡄲㮣ﶤ𞸞ﮅﺛ𐤁抂ﴳﳇ𨴴𧗡פֿךּ𥀴𐬝嫩졢𐩣匡ޘﹴ𤄬𓏤럈𡦟뛖ﶆ𐭕𪭚籤ᬣ𐤩ࡋﶆ律䈎ﬣ=True ^ SyntaxError: invalid character in identifier

Not what I expected..

sayak-brm commented 8 years ago

I obfuscated a program with PyMinifier like pyminifier -o out.py -O --replacement-length=50 --nonlatin in.py.

But on running it I get: File "C:\Users\user\abc\xyz\out.py", line 2 \U000201a7\ufd14\u6f2e\ufce7\U00026edd\u7c83\U0001e82d\U00010b54\ufe7c\U00010800\U0002890a\u068e\ufd81\U00010c13\U00010ce9\U00028744\U00010a99\ufc08\uc574\u06b8\U000203b8\U0002949e\U00023f77\U00010855\U0001092e\uceee\U000210dc\U00010882\ub1eb\U00010828\ufd9d\U00023657\U0001ee1a\ufd9e\ud1c6\U00010b1c\U00010c2a\u904a\U00010b07\ufc19\u071f\ufd51\U0002a71e\u5645\u84ec\u06a6\U0001122b\U00021bb7\u0758\U00010c3d=list ^ SyntaxError: invalid character in identifier

Line to contains the first line of replacements: 𠆧ﴔ漮ﳧ𦻝粃𞠭𐭔ﹼ𐠀𨤊ڎﶁ𐰓𐳩𨝄𐪙ﰈ앴ڸ𠎸𩒞𣽷𐡕𐤮컮𡃜𐢂뇫𐠨ﶝ𣙗𞸚ﶞ퇆𐬜𐰪遊𐬇ﰙܟﵑ𪜞噅蓬ڦ𑈫𡮷ݘ𐰽=list

I am using Py3 (which has unicode support) but this error appears with every program I obfuscate.

AnjaniKumarTiwari-AgNext commented 3 years ago

how did you resolve this issue?