Skip to content

Instantly share code, notes, and snippets.

@UserUnknownFactor
UserUnknownFactor / rpgmv_dec.py
Last active August 22, 2024 12:04
RPG Maker MV/MZ files GUI/console decryptor and encryptor (Python 3)
# -*- coding: utf-8 -*-
import re, time, os, io, sys, binascii
import hashlib
from PIL import Image
pathSysJSON = "www\\data\\System.json"
pathSysJSON1 = "data\\System.json"
pathRpgProject = "www\\Game.rpgproject"
RE_ENC_KEY_CUE = re.compile(r'encryptionKey"\s*:\s*"([^"]+)"')
pyinstaller --onefile filetranslate.py
git rebase -i --root
REM pick to edit :wq
git commit -S --amend --no-edit && git rebase --continue
REM git log --show-signature
@UserUnknownFactor
UserUnknownFactor / common_db.rb
Last active September 6, 2024 14:45
Unpacker/repacker for RPG Maker XP, VX [Ace] games
require 'zlib'
# Some data structures that are common to both VX and VX Ace.
class Rect
def initialize(x, y, width, height)
@x = x
@y = y
@width = width
@height = height
@UserUnknownFactor
UserUnknownFactor / dump_str.py
Last active August 25, 2024 07:45
Unpack/repack tools for RPG Maker VX Ace games (Python port) [Not working]
# coding: utf-8
# Alternative version that doesn't use serialization/deserialization libraries
# it modifies files directly instead.
import argparse, sys, os, glob, re, struct, csv, hashlib, math, zlib
from multiprocessing import Pool
DUMP_ALL_STRINGS = False
OUT_DIR = 'out'
@UserUnknownFactor
UserUnknownFactor / KaresekaHook.cpp
Last active September 9, 2020 15:32
KrkrExtract/KrkrzUniversalPatch fix
#include "KaresekaHook.h"
#include "MyHook.h"
#include "StreamHolderXP3.h"
#include "IStreamExXP3.h"
#include "tp_stub.h"
#include <string>
#include <vector>
using std::wstring;
#include <iostream>
import itertools
import sys
import struct
import zlib
from io import open, BytesIO, SEEK_CUR, SEEK_END # noqa
PY2 = sys.version_info[0] == 2
# Kaitai Struct runtime streaming API version, defined as per PEP-0396
# standard. Used for two purposes:
@UserUnknownFactor
UserUnknownFactor / tyranocut.cmd
Last active September 1, 2022 07:17
PowerShell and Python utility to cut data file out of combined TyranoBuilder executable
powershell -executionPolicy bypass -file "tyranocut.ps1" -Unpack -GameExeName %1
@UserUnknownFactor
UserUnknownFactor / unzip-enc.py
Last active September 30, 2021 07:39
Python utility to unpack zips with unusual file name encoding
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# unzip-enc.py
import os, sys, argparse, locale, zipfile, codecs
from charamel import Detector
def setup_console(sys_enc="utf-8"):
try:
if sys.version_info >= (3, 4):