Init. Commit

This commit is contained in:
Caplag
2026-09-17 00:50:07 +03:00
commit 880d8698d6
115 changed files with 7611 additions and 0 deletions
@@ -0,0 +1,26 @@
#!/usr/bin/env python3
from pathlib import Path
import argparse, base64, hashlib, json, lzma, marshal, os, plistlib, re, struct, subprocess, sys, zipfile, zlib
def xor(data, key):
return bytes(b ^ key[i % len(key)] for i, b in enumerate(data))
def find_after(data, marker):
off = data.index(marker) + len(marker)
ln = struct.unpack_from('<I', data, off)[0]
off += 4
return data[off:off+ln]
def walk_consts(co):
out=[]
for c in co.co_consts:
if isinstance(c, str): out.append(c)
elif hasattr(c, 'co_consts'): out += walk_consts(c)
return out
def main():
ap=argparse.ArgumentParser(); ap.add_argument('wheel', nargs='?', default='../public/wheelhouse_beacon-0.4.2-py3-none-any.whl'); args=ap.parse_args()
with zipfile.ZipFile(args.wheel) as z:
stage=lzma.decompress(z.read('wheelhouse_beacon/data/stage_gate.dat'))
co=marshal.loads(stage[16:])
print(next(v for v in walk_consts(co) if v.startswith('caplag{')))
if __name__=='__main__': main()