CensoredUsername / unrpyc

A ren'py script decompiler
Other
837 stars 149 forks source link

Bug: file magic comparison in deobfuscate.py wrong #118

Closed madeddy closed 3 years ago

madeddy commented 3 years ago

If i am not mistaken 2 little errors have crept in.

  1. Wrong magic string in the comparison: https://github.com/CensoredUsername/unrpyc/blob/8edfc2711e7105c1ab3a1a25d1c3264b8a55cc16/deobfuscate.py#L71 This should end ...RPC2 i'd say.
  2. The file open() input here gives us a bytestring, so a comparison of type bytes and string is always false. Should be b'RENPY RPC2'.
madeddy commented 3 years ago

Resolved with pull req. merge.