Skip to content

Instantly share code, notes, and snippets.

EXEFS_SECTIONS = [
".text",
".ro",
".rw"
]
def align_block(v: int) -> int:
return v + 15 & ~(15)
def make_name(data: bytes) -> str:
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.primitives import hashes, hmac
# https://www.psdevwiki.com/ps4/Keys#PS4-PS5_USB_Extended_Storage_Key
KEY1 = bytes([0x72, 0x13, 0x19, 0x74, 0x52, 0xC6, 0xCC, 0x7E, 0xC8, 0xA3, 0xC0, 0x6C, 0x3E, 0x22, 0xF9, 0x1A])
KEY2 = bytes([0x76, 0x17, 0xB6, 0xE7, 0xA9, 0x73, 0x60, 0xFC, 0x4C, 0x67, 0xBF, 0x38, 0xD0, 0x7F, 0xD7, 0x2D])
def read_sector(path: str, index: int) -> bytes:
with open(path, "rb") as f:
f.seek(index * 0x200, 0)
@kynex7510
kynex7510 / susmodules.txt
Last active November 25, 2024 13:25
List of sysmodule reimplementations
sm: https://github.com/LumaTeam/Luma3DS/tree/master/sysmodules/sm
fs: NA
pm: https://github.com/LumaTeam/Luma3DS/tree/master/sysmodules/pm
loader: https://github.com/LumaTeam/Luma3DS/tree/master/sysmodules/loader
pxi: https://github.com/LumaTeam/Luma3DS/tree/master/sysmodules/pxi
am: https://github.com/ZeroSkill1/3ds_am
camera: NA
cfg: https://github.com/luigoalma/3ds_cfg
codec: NA
dsp: NA
@kynex7510
kynex7510 / runner.bat
Last active August 29, 2022 10:35
IDA Pro Wine Runner
// wine "/path/to/runner.bat" "/path/to/ida(64).exe" %u
@set PATH=%PATH%;.\python3\
@set PYTHONPATH=.\python3
@start /unix %*
@kynex7510
kynex7510 / android_find_apps.py
Created June 25, 2022 08:09
Find android app paths
import subprocess
def get_encoded_paths():
cmd = ['adb', 'shell', 'su', '-c', '"ls /data/app"']
pipe = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
stdout, _ = pipe.communicate()
encoded_paths = stdout.decode().split('\n')
return encoded_paths
def get_pkg_path(path: str):
@kynex7510
kynex7510 / android_rpc.py
Created March 15, 2021 21:09
Discord Samsung Galaxy Rich Presence
import json
from urllib.request import Request,urlopen
#update: START, STOP, UPDATE
p = json.dumps({"package_name": "com.epicgames.fortnite", "update": "START"})
p = p.encode()
req = Request('https://discordapp.com/api/v6/presences', p)
req.add_header("Authorization", "your token")
req.add_header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0")
req.add_header("Content-Type", "application/json")