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 | |
from struct import pack as pk, unpack as up | |
def u32(x): | |
return x & 0xFFFFFFFF | |
def tea_update_custom_mac(mac, v, k): | |
v0, v1 = v[0], v[1] | |
cur_sum = 0xC6EF3720 | |
k0, k1, k2, k3 = k[0], k[1], k[2], k[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
Updated as of firmware 16.0.0. | |
All values except firmware versions and floats are hex. | |
Field names are either official symbols or derived from the name of the accessor/mutator function. | |
Firmware version information for each field is not indicated but likely maps neatly to the firmware versions in which accessor/mutator functions for the given field were introduced. See: https://switchbrew.org/wiki/Settings_services | |
PrivateSettings 8000000000000052 | |
offset size type/name default | |
0 10 GAP | |
10 20 nn::settings::system::InitialLaunchSettings 0 |
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
#!/usr/bin/env python3 | |
import struct | |
import sys | |
import json | |
import base64 | |
import os | |
from pathlib import Path | |
import msgpack | |
import lz4.block |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
#include <string.h> | |
#define FUSE_IMAGE_SIZE 0x400 | |
#define ROM_BASE 0x100000 | |
#define FUSE_BOOTROM_PATCH_SIZE_T210_START_BIT 13 |
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
# CFG Version 03 | |
# Do not edit. Generated by t210_emc_reg_tool_P987.exe V9.8.7. Command: | |
# t210_emc_reg_tool_P987.exe -i Samsung_K4F6E304HB-MGCH_4GB.par 04.90196078431372549019 | |
# -dram_board_cfg 37 -data_bus_to_0 1 -dsr_per_dev 0 -fly_by_time_ps 1833 -dbi_rd_en 1 | |
# -is_bkv 1 -b P2180_A00_LP4_DSC_204Mhz.txt -o P2180_4GB_P987_configs\P2180_4GB_Samsung_4GB_lpddr4_204Mhz_P987.cfg | |
# Parameter file: Samsung_K4F6E304HB-MGCH_4GB.par, tck = 4.90 ns (204.00 MHz) | |
# bkv file: P2180_A00_LP4_DSC_204Mhz.txt | |
SDRAM[0].MemoryType = NvBootMemoryType_LpDdr4; | |
SDRAM[0].PllMInputDivider = 0x00000001; | |
SDRAM[0].PllMFeedbackDivider = 0x00000022; |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <stdbool.h> | |
typedef uint32_t u32; | |
typedef uint8_t u8; | |
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
############################################### | |
# TX SX OS unpacker - by hexkyz and naehrwert # | |
############################################### | |
from Crypto.Cipher import AES | |
from Crypto.Util import Counter | |
import os | |
import struct | |
""" |
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
from Crypto.Cipher import AES | |
from Crypto.Util import Counter | |
import struct | |
""" | |
typedef struct boot_dat_hdr | |
{ | |
unsigned char ident[0x10]; | |
unsigned char sha2_s2[0x20]; | |
unsigned int s2_dst; |
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
diff --git a/libusb/os/linux_usbfs.h b/libusb/os/linux_usbfs.h | |
index 2449632..5ef03ba 100644 | |
--- a/libusb/os/linux_usbfs.h | |
+++ b/libusb/os/linux_usbfs.h | |
@@ -82,7 +82,7 @@ struct usbfs_iso_packet_desc { | |
}; | |
#define MAX_BULK_BUFFER_LENGTH 16384 | |
-#define MAX_CTRL_BUFFER_LENGTH 4096 | |
+#define MAX_CTRL_BUFFER_LENGTH 0xFFFF |
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
from struct import unpack as up, pack as pk | |
from binascii import unhexlify as uhx, hexlify as hx | |
from Crypto.Cipher import AES | |
from Crypto.Util import Counter | |
import sys | |
pk11key = uhx('') # Insert key here. | |
def string_to_ctr(ctr): | |
return Counter.new(128, initial_value=int(hx(ctr), 16)) |
NewerOlder