This file contains hidden or 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
import sys | |
import struct | |
with open(sys.argv[1], "rb") as utv: | |
n = 1 | |
while True: | |
magic = utv.read(16) | |
if not magic == b"\x42\x44\x43\x09\x43\x44\x42\x09\x42\x44\x43\x09\x43\x44\x42\x09": #BDC CDB BDC CDB | |
break | |
This file contains hidden or 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
import sys | |
import struct | |
with open(sys.argv[1], "rb") as ruf: | |
magic = ruf.read(6) | |
if magic != b'RUF\x00\x00\x00': | |
print("invalid magic!") | |
upgrade_type = ruf.read(2).decode('utf-8') | |
print("Upgrade type:", upgrade_type) #BE(?)/LE(Loader) |
This file contains hidden or 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
import sys | |
import os | |
if len(sys.argv) < 2: | |
print("Usage: peaks_splitter.py <PEAKS.bin> <output folder>(optional)") | |
quit() | |
with open(sys.argv[1], "rb") as peaks: | |
save = False | |
if len(sys.argv) == 3: |
This file contains hidden or 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
import sys | |
if len(sys.argv) != 3: | |
print(f"Usage: nttc_to_bin.py <input_file> <output_file>") | |
quit() | |
byte_map = { | |
0x1D: 0x00, 0xE8: 0x01, 0xCE: 0x02, 0x86: 0x03, 0xCB: 0x04, 0x29: 0x05, 0x1B: 0x06, 0xD4: 0x07, | |
0x85: 0x08, 0x96: 0x09, 0x19: 0x0A, 0xFB: 0x0B, 0x1A: 0x0C, 0xC7: 0x0D, 0x64: 0x0E, 0x84: 0x0F, | |
0x4B: 0x10, 0xFF: 0x11, 0x6E: 0x12, 0xF0: 0x13, 0x80: 0x14, 0xF9: 0x15, 0x4F: 0x16, 0x02: 0x17, |
This file contains hidden or 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
import sys | |
if len(sys.argv) != 5: | |
print(f"Usage: oob_univ.py <input file> <data size> <OOB size> <output file>") | |
quit() | |
with open(sys.argv[1], 'rb') as infile, open(sys.argv[4], 'wb') as outfile: | |
while True: | |
chunk = infile.read(int(sys.argv[2])) | |
if not chunk: |