Skip to content

Instantly share code, notes, and snippets.

@UserUnknownFactor
UserUnknownFactor / rpgmv_dec.py
Last active November 5, 2023 07:20
RPG Maker MV files GUI decryptor and encryptor (no key guessing; Python)
# -*- coding: utf-8 -*-
import re, time, tkinter, os, sys, binascii
from tkinter import filedialog, messagebox, ttk
pathSysJSON = "www\\data\\System.json"
pathSysJSON1 = "data\\System.json"
encryptKeyCue = r'encryptionKey"\s*:\s*"([^"]+)"'
pathRpgProject = "www\\Game.rpgproject"
def xor(source, key):
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 May 8, 2024 09:42
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 June 9, 2023 09:13
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):