Пример #1
0
with open(path.join(pack_folder, "un.rpyc"), "wb") as f:
    f.write(unrpyc)

if args.debug:
    print("File length = {0}".format(len(unrpyc)))

    import pickletools

    data = zlib.decompress(unrpyc)

    with open(path.join(pack_folder, "un.dis"), "wb" if p.PY2 else "w") as f:
        pickletools.dis(data, f)

    for com, arg, _ in pickletools.genops(data):
        if arg and (isinstance(arg, str)
                    or p.PY3 and isinstance(arg, bytes)) and len(arg) > 1000:

            if p.PY3 and isinstance(arg, str):
                arg = arg.encode("latin1")

            data = zlib.decompress(arg)
            break
    else:
        raise Exception("didn't find the gzipped blob inside")

    with open(path.join(pack_folder, "un.dis2"), "wb" if p.PY2 else "w") as f:
        pickletools.dis(data, f)

    with open(path.join(pack_folder, "un.dis3"), "wb" if p.PY2 else "w") as f:
        p.pprint(decompiler, f)
Пример #2
0
with open(path.join(pack_folder, "un.rpyc"), "wb") as f:
    f.write(unrpyc)

if args.debug:
    print("File length = {0}".format(len(unrpyc)))

    import pickletools

    data = zlib.decompress(unrpyc)

    with open(path.join(pack_folder, "un.dis"), "wb" if p.PY2 else "w") as f:
        pickletools.dis(data, f)

    for com, arg, _ in pickletools.genops(data):
        if arg and (isinstance(arg, str) or
                    p.PY3 and isinstance(arg, bytes)) and len(arg) > 1000:

            if p.PY3 and isinstance(arg, str):
                arg = arg.encode("latin1")

            data = zlib.decompress(arg)
            break
    else:
        raise Exception("didn't find the gzipped blob inside")

    with open(path.join(pack_folder, "un.dis2"), "wb" if p.PY2 else "w") as f:
        pickletools.dis(data, f)

    with open(path.join(pack_folder, "un.dis3"), "wb" if p.PY2 else "w") as f:
        p.pprint(rpyc, f)
Пример #3
0
with open(path.join(pack_folder, "un.rpyc"), "wb") as f:
    f.write(unrpyc)

if args.debug:
    print("File length = {0}".format(len(unrpyc)))

    import pickletools

    data = zlib.decompress(unrpyc)

    with open(path.join(pack_folder, "un.dis"), "wb" if p.PY2 else "w") as f:
        pickletools.dis(data, f)

    for com, arg, _ in pickletools.genops(data):
        if arg and (isinstance(arg, str) or
                    p.PY3 and isinstance(arg, bytes)) and len(arg) > 1000:

            if p.PY3 and isinstance(arg, str):
                arg = arg.encode("latin1")

            data = zlib.decompress(arg)
            break
    else:
        raise Exception("didn't find the gzipped blob inside")

    with open(path.join(pack_folder, "un.dis2"), "wb" if p.PY2 else "w") as f:
        pickletools.dis(data, f)

    with open(path.join(pack_folder, "un.dis3"), "wb" if p.PY2 else "w") as f:
        p.pprint(decompiler, f)
Пример #4
0
with open(path.join(pack_folder, "un.rpy"), "wb") as f:
    f.write(unrpy)

if args.debug:
    print("File length = {0}".format(len(unrpyc)))

    import pickletools

    data = zlib.decompress(unrpyc)

    with open(path.join(pack_folder, "un.dis"), "wb" if p.PY2 else "w") as f:
        pickletools.dis(data, f)

    for com, arg, _ in pickletools.genops(data):
        if arg and (isinstance(arg, str) or
                    p.PY3 and isinstance(arg, bytes)) and len(arg) > 1000:

            if p.PY3 and isinstance(arg, str):
                arg = arg.encode("latin1")

            data = zlib.decompress(arg)
            break
    else:
        raise Exception("didn't find the gzipped blob inside")

    with open(path.join(pack_folder, "un.dis2"), "wb" if p.PY2 else "w") as f:
        pickletools.dis(data, f)

    with open(path.join(pack_folder, "un.dis3"), "wb" if p.PY2 else "w") as f:
        p.pprint(decompiler_rpyc, f)