Skip to content

Instantly share code, notes, and snippets.

View InvoxiPlayGames's full-sized avatar
🦊
fox on the computer

Emma InvoxiPlayGames

🦊
fox on the computer
View GitHub Profile
@InvoxiPlayGames
InvoxiPlayGames / akamai_weirdtoken_generate.py
Created November 9, 2024 12:12
akamai_weirdtoken_generate.py - generates some sort of Akamai token used by some games here and there
# generates some sort of Akamai token used by some games here and there
# in the format of ?token=1735689600_ffeeddccbbaa998877665544332211
# idk what scheme it's called or anything i just know it does what i want it to
# code by Emma 2024 public domain do whatever
import sys
import struct
import hashlib
def create_url_token(path: str, salt: str, expiry: int):
@InvoxiPlayGames
InvoxiPlayGames / amplitude_save.hexpat
Created September 2, 2024 16:47
W.I.P. Amplitude (2016) save file format ImHex pattern
#pragma author InvoxiPlayGames
#pragma description Amplitude (2016) Save File
// Uncomment if providing a PS3 save file, leave commented for PS4
//#pragma endian big
// Symbol/String definition
struct sym {
u32 len;
char string[len];
@InvoxiPlayGames
InvoxiPlayGames / rpcs3_prx_hash.py
Created March 1, 2024 06:26
rpcs3_prx_hash.py - implementation of RPCS3 prx hashing to help make patch files. wont work on every file but works for RB3Enhanced
import sys
import math
import hashlib
from elftools.elf.elffile import ELFFile
def cmod(a, b):
return abs(a)%abs(b)*(1-2*(a<0))
# referencing RPCS3(Nekotekina): https://github.com/RPCS3/rpcs3/blob/master/Utilities/StrFmt.cpp#L127
def base57(in_data):
@InvoxiPlayGames
InvoxiPlayGames / uidsys-output.c
Created February 22, 2024 01:21
uidsys-output.c - very basic C utility to output a list of all titles found in a Wii's uid.sys
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#ifndef SHOULD_BE_BE
#define BE16(i) ((((i) & 0xFF) << 8 | ((i) >> 8) & 0xFF) & 0xFFFF)
#define BE(i) (((i) & 0xff) << 24 | ((i) & 0xff00) << 8 | ((i) & 0xff0000) >> 8 | ((i) >> 24) & 0xff)
#define BE64(i) (BE((i) & 0xFFFFFFFF) << 32 | BE(((i) >> 32) & 0xFFFFFFFF))
#else
#define BE16(i) i
@InvoxiPlayGames
InvoxiPlayGames / RB3ESongID.cs
Last active February 14, 2024 08:21
RB3ESongID.cs - C# class for generating RB3Enhanced-compatible Song IDs from a given shortname
/*
RB3ESongID.cs by Emma (ipg.gay), 2024
granted to you under the public domain - feel free to use and modify
for ideal usage: *always* use the song ID from the songs.dta if it is an integer.
otherwise, use the symbol from the song_id DataNode. don't assume the shortname at
the start of songs.dta is always the same as the song_id on these broken customs
*/
using System.Text;
@InvoxiPlayGames
InvoxiPlayGames / interactions.php
Created February 16, 2023 01:05
Discord Interactions signature validation in native PHP 7.2+
<?php
$timestamp = $_SERVER['HTTP_X_SIGNATURE_TIMESTAMP'];
$signature = hex2bin($_SERVER['HTTP_X_SIGNATURE_ED25519']);
if ($signature === false) {
die(http_response_code(403));
}
$publickey = hex2bin("[ YOUR_APP_PUBLIC_KEY ]"); // REPLACE THIS WITH YOUR OWN APP'S!
$postdata = file_get_contents('php://input');
// signature verification;
@InvoxiPlayGames
InvoxiPlayGames / 45410914 - Rock Band 3.patch.toml
Created December 18, 2022 19:43
RB3Enhanced Loader Xenia Canary Patch
# This patch requires a build of Xenia Canary that supports writable_code_segments, and having it enabled in the config.
# (Not merged as of 18-Dec-2022, see: https://github.com/xenia-canary/xenia-canary/pull/100)
# Commit 28f3eb6 or later of RB3Enhanced recommended, due to removing the DEMO check.
title_name = "Rock Band 3"
title_id = "45410914"
hash = [
"464451C1022FFF32", # EA disc default.xex + TU5 applied
"02B607A811A4C291" # RB3DX modded pre-patched TU5 XEX
]
@InvoxiPlayGames
InvoxiPlayGames / tcp-to-tls-proxy.js
Created December 3, 2022 02:51
tcp-to-tls-proxy.js - A simple NodeJS proxy to forward a given unencrypted TCP connection to a TLS encrypted server
/*
tcp-to-tls-proxy.js - A simple NodeJS proxy to forward a given unencrypted TCP connection to a TLS encrypted server.
by InvoxiPlayGames, hereby released into the public domain. Not that there's much to it to license.
I created this as a way to connect to my modern, TLS 1.3-supporting XMPP server from iChat on a
PowerBook running OS X Leopard (hence the default ports), but this can be used for anything that
accepts a raw TLS connection where a legacy client can only handle an unencrypted connection.
Please be safe with this, don't run this over an external network as it *is* reducing security.
To use, replace the host and port in tls_settings with your target server, and host_port with
@InvoxiPlayGames
InvoxiPlayGames / ppcasm.h
Created May 4, 2022 22:06
PowerPC assembly opcode macros for C
/*
ppcasm.h by InvoxiPlayGames, 2021
WTFPL License
*/
#include <stdint.h>
// Poke values
#define POKE_8(addr, val) do { *(uint8_t*)(addr) = (uint8_t)(val); } while (0)
#define POKE_16(addr, val) do { *(uint16_t*)(addr) = (uint16_t)(val); } while (0)
@InvoxiPlayGames
InvoxiPlayGames / RBWiiKeytarUnderstander.cs
Created January 12, 2022 08:27
RBWiiKeytarUnderstander.cs - Basic Rock Band 3 Wii Keyboard / Keytar Parser in C#
/*
RBWiiKeytarUnderstander.cs by InvoxiPlayGames 2022
Licensed under WTFPL
Requires LibUsbDotNet NuGet package, licensed under LGPLv3
Use Zadig to install WinUSB or LibUSB drivers for the device
*/
using LibUsbDotNet;
using LibUsbDotNet.Main;
using LibUsbDotNet.WinUsb;
using System;