Skip to content

Commit

Permalink
Remove all renpy loaders from sys.meta_path properly, instead of remo…
Browse files Browse the repository at this point in the history
…ving all but them.
  • Loading branch information
CensoredUsername committed Mar 8, 2024
1 parent 8d42d46 commit 74e3c8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions un.rpyc/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def Exec(code):
for i in sys.modules.copy():
if "renpy" in i and not "renpy.execution" in i:
sys.modules.pop(i)
sys.meta_path[:] = [i for i in sys.meta_path if "renpy" in i.__class__.__module__]
sys.meta_path[:] = [i for i in sys.meta_path if "renpy" not in i.__class__.__module__]
''', globals())
# decompiler injection
Expand Down Expand Up @@ -209,7 +209,7 @@ def Exec(code):
for i in renpy_modules:
if "renpy" in i and not "renpy.execution" in i:
sys.modules.pop(i)
sys.meta_path[:] = [i for i in sys.meta_path if "renpy" in i.__class__.__module__]
sys.meta_path[:] = [i for i in sys.meta_path if "renpy" not in i.__class__.__module__]
# ?????????
unrpyc = pickle.loads(base64.b64decode({}))
Expand Down

0 comments on commit 74e3c8f

Please sign in to comment.