This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse, shutil, os | |
def find_and_dump(file_path, signature, ext1, ext2): | |
"""Finds a byte signature in a file and dumps the content before and after that point. | |
Args: | |
file_path: Path to the file to search. | |
signature: Byte signature to search for. | |
ext: Extension to use for the output files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, csv, glob, re | |
from PIL import Image, ImageDraw, ImageFont | |
""" | |
This tool can read translations from: | |
`original→translation→image_without_extension[;text_pos_x,text_pos_y;overlay_path;overlay_x,overlay_y;custom_font;font_size;font_color]` | |
formatted .csv file and apply it to all images in the specified folder, after replacing | |
background to a specified image at specified coordinates. Text supports colored borders | |
and style tags like <b>, <i> (not enabled now) or <color="#ff0000"> in the text. | |
All stuff is only configurable in the code. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from __future__ import print_function | |
import sys | |
import os | |
import codecs | |
import errno | |
import random | |
try: | |
import pickle5 as pickle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var commandNames = { | |
"101":"Show Text", | |
"102":"Show Choices", | |
"103":"Input Number", | |
"104":"Select Item", | |
"402":"When [**]", | |
"403":"When Cancel", | |
"103":"Input Number", | |
"104":"Select Item", | |
"105":"Show Scrolling Text", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script duplicates the current selected text layer to every open document | |
// and replaces text in the each of those 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 additionally | |
// hides 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
powershell.exe -ExecutionPolicy Bypass -Command "$_=((Get-Content \"%~f0\") -join \"`n\");iex $_.Substring($_.IndexOf(\"goto :\"+\"EOF\")+9)" | |
del add_json_debug.cmd | |
@goto :EOF | |
$pliginsName = ".\www\js\plugins.js" | |
$pluginsStr =(Get-Content $pliginsName) | |
if($pluginsStr -like '*DebugJSONLoad*') { | |
Write-Host "Already patched!" | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
powershell.exe -ExecutionPolicy Bypass -Command "$_=((Get-Content \"%~f0\") -join \"`n\");iex $_.Substring($_.IndexOf(\"goto :\"+\"EOF\")+9)" | |
del add_plugin.cmd | |
@goto :EOF | |
$pliginsName = ".\www\js\plugins.js" | |
$pluginsStr =(Get-Content $pliginsName) | |
if($pluginsStr -like '*RoamingSavePath*') { | |
Write-Host "Already patched!" | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
NewerOlder