mirror of
https://gitea.tendokyu.moe/beerpsi/x.git
synced 2024-12-18 10:35:53 +01:00
just put the keys out there idrc
This commit is contained in:
parent
fce4269fc9
commit
8ca3bc37ba
@ -6,8 +6,6 @@ Miscellaneous scripts that don't need their own repo.
|
|||||||
- `segafs/makesegafs.py`: Create an `app`/`opt`/`pack` (same thing) from an unencrypted
|
- `segafs/makesegafs.py`: Create an `app`/`opt`/`pack` (same thing) from an unencrypted
|
||||||
disk image.
|
disk image.
|
||||||
- Dependencies: `pip install construct PyCryptodome`
|
- Dependencies: `pip install construct PyCryptodome`
|
||||||
- You will need to find the BootID key/IV and the HMAC key yourself if you want to
|
|
||||||
make fake apps for whatever reason. Or just don't.
|
|
||||||
|
|
||||||
## Patchers
|
## Patchers
|
||||||
- `patchers/b2spatch.mjs`: Convert from BemaniPatcher to Spice2x JSON
|
- `patchers/b2spatch.mjs`: Convert from BemaniPatcher to Spice2x JSON
|
||||||
|
@ -63,12 +63,9 @@ BOOTID = {
|
|||||||
|
|
||||||
# ---- Keys
|
# ---- Keys
|
||||||
# The BootID (app/opt/pack header) encryption key and IV.
|
# The BootID (app/opt/pack header) encryption key and IV.
|
||||||
BTKEY = bytes.fromhex("")
|
BTKEY = bytes.fromhex("09ca5efd30c9aaef3804d0a7e3fa7120")
|
||||||
BTIV = bytes.fromhex("")
|
BTIV = bytes.fromhex("b155c22c2e7f0491fa7f0fdc217aff90")
|
||||||
|
SIGKEY = bytes.fromhex("e1bdcb2d5e9ed3b5de234364dfa4d126849edff769fc6c28fba5f43bc482bd7479d676afce8188e1d3a6852f4ebce45cde46bd15e8ee5fe84d197f945a54518f")
|
||||||
# The HMAC key that ensures the app/opt/pack created is authentic.
|
|
||||||
SIGKEY = bytes.fromhex("")
|
|
||||||
|
|
||||||
HEADER_META_PUBKEY = RSA.import_key("""-----BEGIN PUBLIC KEY-----
|
HEADER_META_PUBKEY = RSA.import_key("""-----BEGIN PUBLIC KEY-----
|
||||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsRMLnJuczNpfoqPpHQ3o
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsRMLnJuczNpfoqPpHQ3o
|
||||||
5XNkjKXO6P3ToV/45Az5dNaHVL7uEu9vPI7a2KYFQnNYgD3UUHFahfTcljzLOkcH
|
5XNkjKXO6P3ToV/45Az5dNaHVL7uEu9vPI7a2KYFQnNYgD3UUHFahfTcljzLOkcH
|
||||||
@ -140,8 +137,8 @@ BOOTID["block_count"] = ceil(filesize / BOOTID["block_size"]) + 8
|
|||||||
header_meta = struct.pack("<Q", time.time()) + os.path.abspath(INPUT_FILE).encode("utf-8")
|
header_meta = struct.pack("<Q", time.time()) + os.path.abspath(INPUT_FILE).encode("utf-8")
|
||||||
header_meta += secrets.token_bytes(BOOTID["block_size"] - len(header_meta))
|
header_meta += secrets.token_bytes(BOOTID["block_size"] - len(header_meta))
|
||||||
header_meta = PKCS1_OAEP.new(HEADER_META_PUBKEY).encrypt(header_meta)
|
header_meta = PKCS1_OAEP.new(HEADER_META_PUBKEY).encrypt(header_meta)
|
||||||
bullshit_crc32 = zlib.crc32(header_meta)
|
header_meta_crc32 = zlib.crc32(header_meta)
|
||||||
block_crc32s = [0, bullshit_crc32, bullshit_crc32, bullshit_crc32, bullshit_crc32, bullshit_crc32, bullshit_crc32, bullshit_crc32]
|
block_crc32s = [0, header_meta_crc32, header_meta_crc32, header_meta_crc32, header_meta_crc32, header_meta_crc32, header_meta_crc32, header_meta_crc32]
|
||||||
|
|
||||||
with open(INPUT_FILE, "rb") as fin, open(OUTPUT_FILE, "w+b") as fout:
|
with open(INPUT_FILE, "rb") as fin, open(OUTPUT_FILE, "w+b") as fout:
|
||||||
# Write the bootID.
|
# Write the bootID.
|
||||||
|
Loading…
Reference in New Issue
Block a user