Skip to content

Instantly share code, notes, and snippets.

View Decencies's full-sized avatar
💭
Bri'ish

Decencies

💭
Bri'ish
View GitHub Profile
@Decencies
Decencies / sinodump.py
Last active November 19, 2023 02:33 — forked from castleberrysam/fw_decrypt.py
Image extractor/decrypter for Beiying K8xx/K9xx (sinowealth SH6xFxxx/SH7xFxxx) firmware update files
#!/usr/bin/env python3
from struct import *
from argparse import *
# Royal Kludge vendor ID
rk_venor = 0x258a
# Update File magic bytes
upf_magic = b'\x5a\xa5SINO'
@Decencies
Decencies / jnic-3.5.1-evaluator.c
Created February 6, 2023 00:56
JNIC 3.5.1 Sim0n/Evaluator output
This file has been truncated, but you can view the full file.
/*
* Auto-generated JNIC implementation file
*
*
*
*
*
*
*/

Introduction

This small document will explain how I cracked version 3.3.1 of JNIC. (https://jnic.dev)

Motive

The motive of this crack was simply to test the strength of "DRM" applied to JNIC.

Methodology

Discovering the funny :trollface:

Upon opening the JNIC JAR in a decompiler, I quickly discovered a 'JNICLoader' class, which contained methods whos first parameter were MethodHandles (all of these methods were named 'invoke').

/**
* Creates a pipeline associated to this block.
*
* @param [I] the current block's input.
* @param [O] the current block's output.
* @param [K] the resulting block's output.
*
* @return a block of type ([I]) -> [K].
*/
operator fun <I, O, K> ((I) -> O).plus(next: (O) -> K): (I) -> K = { input -> next(this(input)) }