Skip to content

Instantly share code, notes, and snippets.

@UserUnknownFactor
UserUnknownFactor / pymd5.py
Last active May 24, 2024 08:18
Pure Python implementation of MD5 algorithm for experiments and custom mods
#!/usr/bin/python3
# RSA Data Security, Inc., MD5 message-digest algorithm
# Copyright (C) 1991-1992, RSA Data Security, Inc.
"""
## pymd5 module
### The MD5 hash implementation in pure Python
The module exposes same methods as hashlib.md5 and a couple of
low-level methods to help with crypto experiments.
@UserUnknownFactor
UserUnknownFactor / pgmmv_dec.py
Last active May 25, 2024 08:16
PGM MV file decryptor with a separate Twofish cryptography library
try:
from twofish import Twofish # use github.com/blazepaws/python-twofish
except:
from pytwofish import Twofish # since the included implementation is slow
import struct
from typing import List
from base64 import b64decode
import os
import json
@UserUnknownFactor
UserUnknownFactor / CultureInfoPatch.cs
Last active June 7, 2025 08:33
This is a C# patch for games locked to Japanese locale due to incorrectly using CultureInfo defaults
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("ja-JP", false);
System.Threading.Thread.CurrentThread.CurrentCulture = ci;
System.Threading.Thread.CurrentThread.CurrentUICulture = ci;
@UserUnknownFactor
UserUnknownFactor / rpa_unpacker.py
Created March 8, 2024 12:47
Renpy raw .rpyc string extractor and repacker (useful if other tools fail to extract the strings)
#!/usr/bin/env python3
from __future__ import print_function
import sys
import os
import codecs
import errno
import random
try:
import pickle5 as pickle
@UserUnknownFactor
UserUnknownFactor / Photoshop_Duplicate-to-All-Text-Change.jsx
Last active March 2, 2025 11:09
Photoshop JS script to duplicate a group of layers to all files
// This script duplicates the current selected text and other layers to every open
// document and replaces text in the each of the text layers to the one specified in
// arrow separated CSV file in format: `{filename without extension}→Added text`
// it can automatically save modified files as PSDs and can additionally
// hide the only image layer in each document if present.
if (app.documents.length > 0) {
var csvFile = File.openDialog("Select CSV file", "Arrow Separated Values:*.csv", false);
if (csvFile) {
var csvData = readCSV(csvFile);
@UserUnknownFactor
UserUnknownFactor / dump_rbr_strings.py
Last active February 25, 2025 09:52
Bakin resource extractor
import os, re, argparse, glob
from unicodedata import category
from filetranslate.service_fn import write_csv_list, read_csv_list, read_csv_dict
from filetranslate.language_fn import tag_hash
# NOTE: This should work for both Bakin RPG Maker and Smile Game Builder files
def write_7bit_encoded_int(stream, value):
result = bytearray()
while True:
@UserUnknownFactor
UserUnknownFactor / dump_unreal_strings.py
Last active December 21, 2023 13:02
Python tool to dump all strings from Unreal .uexp file of unknown format
# coding: utf-8
# Python tool to dump all strings from Unreal .uexp files of unknown format
import argparse, sys, os, glob, re, struct, csv, hashlib, math, zlib
from multiprocessing import Pool
DUMP_ALL_STRINGS = False
DATA_NAMES = list(glob.glob('.\\**\\*.uexp', recursive=True)) + list(glob.glob('.\\**\\*.uasset', recursive=True))
ESCAPE_CHAR = '¶'
DELIMITER_CHAR = '→'
@UserUnknownFactor
UserUnknownFactor / consomeriyo.ttf
Last active January 2, 2024 03:55
Consolas+Meiryo hybrid font for showing Japanese characters in windows console with chcp 65001 (utf-8) encoding.
This file has been truncated, but you can view the full file.
@UserUnknownFactor
UserUnknownFactor / config-dnsquery.xml
Last active May 5, 2023 04:22
Sysmon config to only check DNS requests from a specific source
<Sysmon schemaversion="4.83">
<!--
Sysmon (https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon)
config to only monitor DNS requests from specific processes.
Install it like this:
sysmon -accepteula -i config-dnsquery.xml
or reconfigure, if it's already installed before:
sysmon -c config-dnsquery.xml
To check events run:
mmc eventvwr.msc
@UserUnknownFactor
UserUnknownFactor / revert_kblayout.cmd
Last active January 19, 2023 18:35
Kill that windows language switcher floaty thingy (Windows 10)
@echo off
cd /d "%~dp0"
Title "Reverting input layout popup to Windows 10 default..."
::filedll
set filedll=%windir%\system32\InputSwitch.dll
takeown /F %filedll% /A
icacls %filedll% /grant:r "*S-1-5-32-544":f
icacls %filedll% /setowner "*S-1-5-32-544" /C /L /Q