Skip to content

Instantly share code, notes, and snippets.

@UserUnknownFactor
UserUnknownFactor / unnsisbi.py
Created August 27, 2026 20:57
Unpacks NSISBI Unity Editor installers with file mask support
import argparse
import io
import logging
import lzma
import mmap
from pathlib import Path
import re
import struct
from typing import BinaryIO, List, Optional, Tuple
@UserUnknownFactor
UserUnknownFactor / mscorlibjajp.py
Last active August 27, 2026 21:02
Fixes mscorlib.dll to always use the ja-JP locale for all ConstructCurrentCulture calls
import pefile
import struct
import re
import sys
import os
import shutil
LOCALE_NAME = "ja-JP" # this should exist in the string table or patch it instead of a 5-wchar string
def patch_mscorlib(input_path):
@UserUnknownFactor
UserUnknownFactor / chromegpublpatch.py
Last active August 27, 2026 20:51
Chromium gpu blackist permanent commandline patcher
#!/usr/bin/env python3
"""
Universal Chrome x64 patcher.
Replaces the "ignore-gpu-blocklist" etc checks call with mov eax, 1.
Requires: pip install pefile
Usage: python patch_chrome.py chrome.exe
"""
import sys
import pefile
@UserUnknownFactor
UserUnknownFactor / __init__.py
Created August 30, 2025 14:38
Just another mod of Win10 Python toast notifier
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['ToastNotifier']
# #############################################################################
# ########## Libraries #############
# ##################################
@UserUnknownFactor
UserUnknownFactor / nfi.py
Last active August 13, 2025 07:41
Full Python port of NTFS File Information Utility
"""
NTFS File Information Utility
Dumps information about an NTFS volume, and optionally determines
which volume and file contains a particular sector and vice versa.
"""
import ctypes
from ctypes import wintypes
import os
import sys
@UserUnknownFactor
UserUnknownFactor / il2cpp_str_tool.py
Last active July 17, 2025 13:04
Tool for extracting and modifying strings in Unity IL2CPP global-metadata.dat file to variable length strings; can keep overall string table size the same by trimming/padding disposable strings (with 1 in the 4th csv column)
#!/usr/bin/env python3
import argparse
import json
import os
import shutil
import sys
from filetranslate.service_fn import read_csv_list, write_csv_list
@UserUnknownFactor
UserUnknownFactor / exe_strings_tool.py
Last active May 9, 2026 16:02
Python tool to translate x86 exe strings by replacing their references to a newly created .trans PE section
import struct
import pefile
import re
import capstone
from tqdm import tqdm
CACHE_DIR = "__pycache__"
cache = None
ENABLE_CACHE = True
try:
@UserUnknownFactor
UserUnknownFactor / xna5_tool.py
Created June 27, 2025 04:44
Tool to unpack/repack XNA game framework XNB images (5 version only; Color/Bgr565 formats only; skips non-image data)
#!/usr/bin/env python3
"""
XNA Texture Extractor/Repacker
Extracts XNB files to PNG and repacks PNG files to XNB format.
"""
import os, sys, struct, argparse, logging, re
from pathlib import Path
from enum import IntEnum
from PIL import Image
@UserUnknownFactor
UserUnknownFactor / bruns_tool.py
Last active June 7, 2025 08:17
Tool to decrypt and re-encrypt Bruns engine game files (images and scripts)
import os
import struct
import argparse
import numpy as np
import zlib
def generate_xor_key(size):
"""Generate the XOR key based on the size value"""
xor_key = np.array([
size & 0xFF,
@UserUnknownFactor
UserUnknownFactor / key_xor_files_by_ext.py
Created May 2, 2025 08:39
Tool to xor multiple files with multi-byte key at once by extension
import os
import numpy as np
import re
def xor_files(key_string, extension=".txt", prefix="dec_", bytes_required=6):
key_bytes = bytes([int(x, 16) for x in key_string.split()])
#assert len(key_bytes) == bytes_required, f"Key must be exactly {bytes_required} bytes"
# Get all files in the current directory
all_files = [f for f in os.listdir() if f.lower().endswith(extension)]