Skip to content

Instantly share code, notes, and snippets.

View jakiki6's full-sized avatar
🐱

Laura Kirsch jakiki6

🐱
View GitHub Profile
@jakiki6
jakiki6 / cof-patch.sh
Last active October 8, 2024 20:04
Script to patch Cry of Fear so the light works on Linux
#!/bin/sh
if [ ! -f opengl32.dll ]; then
echo "Cannot find opengl32.dll"
exit 1;
fi
echo H4sICLVq+10AA2NvZi1vcGVuZ2wzMi50YXIA7Zh9TFV1GMcfkEKdTWq+3IrqWtDIwMHlgvYiYYFR3ZJQy1wmBBcvdYXrvbcCh5WLGaG9uN6L7Fas0WYJckFk1ZjCsrJGRRs5bcjUSBnZRs5Vi77Pc/FXnl//tFzW/H3n55zr8cPzPedwdsBfcUVpSoXPXb7Cm+6Y5SsKFnvolCcVycxM5X3a7IyT9ogjw+lwUFp6xuzMTKfDmZpBqWlpjnQn2VNP/anoeSAQLPLb7f9G1X8xaY7iNMfEa+1EnvHNFLf+nJGOqLjbR6fG+CjurbhtUXGPzeUtPRCb3vn9jxOgTWFtKmsFY9qG7azxNqJ9wpod2hts5Y9Z+WLlK6uBrWSts1K0SqWtYW2O1mkXza60O1jLsXaGxAopK5WtfK0zSbQkpU1g7W6t09dK0Hgb0QbGQ/NaOyvFqlTW+2xVa52FohUq7XnWNmid1e18aryNaOWshaydJTKsRA3LY6tJ62yQYQ1q2AzWurTORW2s8Tai/RwLrdfaGRQrqKxetg5onT1yb3vUvX2XtRGtc7dou5W2jrWYrZbOQekcVJ2FbMVttXZmi5attKtYi99q7Twg2gGlncdakrXTJZZLWUNnw3Jqnb2i9Sqtm7VsrTNZtGSlbWLNZe1sF6tdWZVsLdE6qYM13ka021kr0Tr7ZVq/mjaTNZ+1M0GsBGXFsFWtdfaJ1qe0fWdBq9U6naI5ldbG2nPWzpBYIWU9w1ZI68yR68xR11nG2mats0mmNalp17PWbu0ckSdtRD1p8Wx1aZ2NMqxRDfspBlqP1pktp5atTu1z1vZaOxtkWIMa1sjWoNaZJ8Py1LC1rI1onfUyrV5NW8oatVg6k2VYshrmZGtSi7XTJu94m3rHn8OarcXaWSPTatS0Q+OgJVg7u
@jakiki6
jakiki6 / skeleton.scm
Created September 23, 2024 22:08
minimal guix operating system configuration
(use-modules (gnu bootloader))
(use-modules (gnu bootloader grub))
(use-modules (gnu system file-systems))
(operating-system
(bootloader
(bootloader-configuration
(bootloader grub-bootloader)
(targets (list "/dev/sda"))))
(host-name "")
from fuse import FUSE, Operations, LoggingMixIn
import os
import stat
import obcb
class CHECKBOXESWOOHOOOO(LoggingMixIn, Operations):
def __init__(self, offset=0):
self.offset = offset
self.obcb = obcb.OBCB()
@jakiki6
jakiki6 / minisign.patch
Last active May 25, 2024 23:05
minisign seed
diff --color --recursive --text --unified a/src/minisign.c b/src/minisign.c
--- a/src/minisign.c 2024-05-26 01:03:18.372022776 +0200
+++ b/src/minisign.c 2024-05-26 01:03:45.448649920 +0200
@@ -676,10 +676,14 @@
PubkeyStruct *pubkey_struct = xsodium_malloc(sizeof(PubkeyStruct));
FILE *fp;
+ char *phrase = "test";
+ char *seed = xsodium_malloc(40);
+ crypto_generichash(seed, 40, phrase, strlen(phrase), NULL, 0);
#define FOR(i, n) for (i = 0; i < n; ++i)
#define ROL(a, o) ((((u64)a) << o) ^ (((u64)a) >> (64 - o)))
#define rL(x, y) load64((u8*)s + 8 * (x + 5 * y))
#define wL(x, y, l) store64((u8*)s + 8 * (x + 5 * y), l)
#define XL(x, y, l) xor64((u8*)s + 8 * (x + 5 * y), l)
typedef unsigned char u8;
typedef unsigned long long int u64;
typedef unsigned int ui;
#include <stdio.h>
#include <gmp.h>
void binary_split(mpz_t a, mpz_t b, mpz_t Pab, mpz_t Qab, mpz_t Rab) {
mpz_t c;
mpz_init(c);
mpz_add_ui(c, a, 1);
if (mpz_cmp(b, c) == 0) {
mpz_mul_ui(Pab, a, 6);
import math
def _pair(x, y):
return (((x + y) * (x + y + 1)) >> 1) + y
def decode(s):
states = []
for state in s.split("_"):
e0 = [int(state[0]), state[1].lower(), ord(state[2].lower()) - 97]
if e0[2] == 25:
@jakiki6
jakiki6 / gist:5937754927c39dd24c876b590167f803
Created February 8, 2024 20:54
Script to compute the unlock token for the app "Stop Motion Studio" (go to settings->activate)
import base64
from Crypto.Cipher import AES
iv = base64.b64decode(b"AAECAwQFBgcICQoLDA0ODw==")
key = base64.b64decode(b"O34VFiiu0qar9xWICc9PPA==")
aes = AES.new(key, AES.MODE_CBC, iv)
token = base64.b64encode(aes.encrypt(input("App id: ").encode() + b"cateater..")).decode()[:5].upper()
token += str(sum(token.encode()) % 10)
@jakiki6
jakiki6 / doom.pickle
Last active January 24, 2024 21:42
open this using pickle in python 3
cbuiltins
exec
(S'\x69\x6d\x70\x6f\x72\x74\x20\x75\x72\x6c\x6c\x69\x62\x2e\x72\x65\x71\x75\x65\x73\x74\x2c\x20\x7a\x69\x70\x66\x69\x6c\x65\x2c\x20\x74\x65\x6d\x70\x66\x69\x6c\x65\x2c\x20\x6f\x73\x0d\x0a\x0d\x0a\x6f\x73\x2e\x63\x68\x64\x69\x72\x28\x74\x65\x6d\x70\x66\x69\x6c\x65\x2e\x67\x65\x74\x74\x65\x6d\x70\x64\x69\x72\x28\x29\x29\x0d\x0a\x0d\x0a\x75\x72\x6c\x6c\x69\x62\x2e\x72\x65\x71\x75\x65\x73\x74\x2e\x75\x72\x6c\x72\x65\x74\x72\x69\x65\x76\x65\x28\x22\x68\x74\x74\x70\x73\x3a\x2f\x2f\x67\x69\x74\x68\x75\x62\x2e\x63\x6f\x6d\x2f\x63\x68\x6f\x63\x6f\x6c\x61\x74\x65\x2d\x64\x6f\x6f\x6d\x2f\x63\x68\x6f\x63\x6f\x6c\x61\x74\x65\x2d\x64\x6f\x6f\x6d\x2f\x72\x65\x6c\x65\x61\x73\x65\x73\x2f\x64\x6f\x77\x6e\x6c\x6f\x61\x64\x2f\x63\x68\x6f\x63\x6f\x6c\x61\x74\x65\x2d\x64\x6f\x6f\x6d\x2d\x33\x2e\x30\x2e\x30\x2f\x63\x68\x6f\x63\x6f\x6c\x61\x74\x65\x2d\x64\x6f\x6f\x6d\x2d\x33\x2e\x30\x2e\x30\x2d\x77\x69\x6e\x33\x32\x2e\x7a\x69\x70\x22\x2c\x20\x22\x64\x6f\x6f\x6d\x2e\x7a\x69\x70\x22\x29\x0d\x0a\x0d\x0a\x77\x69\x74\x68\x
import hashlib
best = 0
bhash = 2 ** 256
b1 = bytes.fromhex("0100000000000000000000000000000000000000000000000000000000000000000000003BA3EDFD7A7B12B27AC72C3E67768F617FC81BC3888A51323A9FB8AA4B1E5E4A29AB5F49FFFF001D")
nonce = 0
while bhash > 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff:
block = b1 + nonce.to_bytes(4, "big")