Skip to content

Instantly share code, notes, and snippets.

@neuschaefer
neuschaefer / front.svg
Last active February 19, 2023 09:58
HS1168-8001-02(B) board RE
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/python3
import os
import sys
"""
This (pure!) python script streams a YUV4MPEG format video to stdout. It easily
runs at 1080p60fps on my machine.
Pipe it into a media player like this:
@neuschaefer
neuschaefer / parse-parttable.py
Last active August 22, 2022 12:23
M88CS8001
#!/usr/bin/python3
# ATTENTION: Please see https://github.com/neuschaefer/m88cs8001/blob/main/tools/parse-parttable.py for an updated version!
from construct import *
import zlib, argparse, os
TABLE_BASE = 0x10000
NCRC = Int32ul.parse(b'NCRC')
Entry = Struct(
'flags' / Hex(Int32ul),
#!/usr/bin/python3
# MStar firmware decryption tool
from Crypto.Cipher import AES
import sys
key = 4 * b'\x12\x34\x56\x78'
aes = AES.new(bytes(key), AES.MODE_ECB)
for filename in sys.argv[1:]:
with open(filename, 'rb') as f:
@neuschaefer
neuschaefer / uclist
Created October 6, 2019 19:42
Unicode codepoint lister
#!/usr/bin/python3
import sys
DATAFILE='/usr/share/unicode/UnicodeData.txt'
class Entry:
def __init__(self, line):
fields = line.split(';')
self.codepoint = int(fields[0], 16)
self.name = fields[1]
@neuschaefer
neuschaefer / what.md
Last active September 15, 2019 11:09
i.MX 27 devboard
// SPDX-License-Identifier: GPL-2.0+
// Copyright 2019 Jonathan Neuschäfer
//
// The Kobo Aura e-book reader, model N514. The mainboard is marked as E606F0B.
/dts-v1/;
#include "imx50.dtsi"
#include <dt-bindings/input/input.h>
/ {
@neuschaefer
neuschaefer / System.map
Last active January 13, 2019 20:39
Wii CONFIG_STRICT_KERNEL_RWX tests
This file has been truncated, but you can view the full file.
c0000000 T _start
c0000000 T _stext
c0000000 T _text
c000000c T __start
c0000028 t __after_mmu_off
c0000064 t turn_on_mmu
c00000c4 T __secondary_hold
c00000cc T __secondary_hold_spinloop
c00000d0 T __secondary_hold_acknowledge
c0000100 t Reset
#!/bin/sh
PART=input.part
BLUE='\033[1;34m'
WHITE='\033[1;37m'
NC='\033[0m'
hd "$PART" | grep -E '^[0-9a-f]{8} d0 0d fe ed' --line-buffered | \
while read LINE; do