Skip to content

Instantly share code, notes, and snippets.

View ryank231231's full-sized avatar
😪
I may be slow to respond.

ryank231231 ryank231231

😪
I may be slow to respond.
View GitHub Profile
@ryank231231
ryank231231 / pkeycheck.tjs
Created November 7, 2021 04:52
`pkeycheck.tjs` in 9-nine- PKG
function ProductKeyCheckOne(config, pk) {
try {
pk = string(pk).toUpperCase().replace(/[^A-Z0-9]/g, "");
//System.inform(input);
var chk;
with (config) chk = ProductKeyCheck(.len, pk, .pub, .chk, .sig);
if (chk !== void && chk.length == config.bin) {
var tag1 = "%02X%02X%02X%02X".sprintf(chk[7], chk[6], chk[5], chk[4]);
var tag2 = "%08X".sprintf(config.tag);
return (tag1 == tag2);
@ryank231231
ryank231231 / main.c
Created August 19, 2021 14:28
prpr
/*
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
# Name: softdenchi_remove.py
#
# Usage: Drag game.exe onto softdenchi_remove.py.
# This will make a new exe in the same location as game.exe.
#
# Process: SoftDenchi is a DRM that requires you to run its parent program in
# the background before it will run the protected binary. The parent
# service behaves eerily similar to malware in that it is constantly
# running in the background, even when you aren't using applications
# protected by it. The parent service UCManSvc is somewhat intricate
from apng import PNG, make_chunk, Chunk
import struct, sys, argparse
parser = argparse.ArgumentParser(description='PNG offset update')
parser.add_argument('infile', help='input file')
parser.add_argument('x', type=int, help='x')
parser.add_argument('y', type=int, help='y')
parser.add_argument('-o', '--out', help='output file. default is input file')
parser.add_argument('-t', '--type', help='offset type, caNv or oFFs', choices=['oFFs', 'caNv'], default='oFFs')
args = parser.parse_args()
infile = args.infile
/*
* To compile:
*
* cl k380_fn_on.c /link user32.lib kernel32.lib
*
* Based on:
* http://www.trial-n-error.de/posts/2012/12/31/logitech-k810-keyboard-configurator/
* https://github.com/embuc/k480_conf
* https://github.com/jergusg/k380-function-keys-conf
*