Svenskithesource / PyArmor-Unpacker

A deobfuscator for PyArmor.
GNU General Public License v3.0
493 stars 73 forks source link

Handle EXTENDED_ARG for handle_under_armor #13

Closed Svenskithesource closed 2 years ago

Svenskithesource commented 2 years ago

When there are so many globals that __armor__ is above the index of 255 Python will use EXTENDED_ARG, I didn't keep that in mind previously so we have to handle that as well now. Example:


  1         0 EXTENDED_ARG 1
             2 JUMP_FORWARD 30
...            
...            
         286 EXTENDED_ARG 1 # We previously didn't keep in mind this could be possible
         288 LOAD_GLOBAL 30 (__armor__)