Skip to content

Instantly share code, notes, and snippets.

View MikuAuahDark's full-sized avatar

Miku AuahDark MikuAuahDark

View GitHub Profile
@MikuAuahDark
MikuAuahDark / sif_gettoken.lua
Created December 15, 2016 07:25
SIF WW Get Token Lua Script
-- sif_gettoken.lua
-- Get SIF token from memory (for SIF W v4.0.2)
-- Run under LuaJIT and as root
-- These 2 variables can be edited
local PACKAGE = "klb.android.lovelive_en"
local POINTER_ADDRESS = 0x46E438
-- Check if it's running as root
if os.getenv("USER") ~= "root" then
@MikuAuahDark
MikuAuahDark / livesim2_file_format.txt
Last active July 20, 2019 13:06
DEPLS2 beatmap format specification
Live Simulator: 2 binary beatmap file format. Extension: .ls2
Version 2.0
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! OBSOLETE, PREFER LS2OVR BEATMAP !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The beatmap format consist of multiple sections, where each
section has FourCC and possibly with size depends on the FourCC itself.
The section can appear in any order. Like, storyboard section can appear
@MikuAuahDark
MikuAuahDark / NPPS3_Example.php
Last active August 5, 2017 13:33
NPPS3 module action handler example.
<?php
// Example NPPS3 module action handler
return new class implements NPPS\ActionHandler
{
// You can add your variables in here.
private $YourVariables;
// Constructor must be public. One-time initialization can be done here.
public function __construct() {}
// Destructor must be public too. Do cleanup in here
public function __destruct() {}
@MikuAuahDark
MikuAuahDark / authkey.php
Created March 15, 2017 13:49
NPPS3 example login/authkey
<?php
// login/authkey
return new class implements NPPS\ActionHandler
{
private $NPPSDB = NULL;
function __construct()
{
$NPPSDB = NPPS\GetMainDatabase();
}
function __destruct() {}
@MikuAuahDark
MikuAuahDark / flsh_dumper.lua
Created May 1, 2017 02:11
Lua script to view more information about Playground Flash File
-- Playground FLSH asset dumper.
-- It does not allow you to make new FLSH file!!!
local arg = {...}
local target_input = arg[1]
if target_input == nil then
print("Usage: lua flsh_dumper.lua <flsh path>")
print("It does not allow you to make new FLSH file!!!")
return 1
@MikuAuahDark
MikuAuahDark / DecrypterBenchmark.md
Last active September 4, 2019 13:05
SIF Decrypter Benchmark

Decrypter Benchmark

Test comparison of HonokaMiku v6.0.3 vs libhonoka v2.1.0 (both are not open source program)

Executable is 32-bit, compiled with Visual Studio 2010, with /Ox /Ot /Oi optimization.
HonokaMiku also additionally compiled with /EHsc option.

CPU: Intel Core i5-7200u 2.5GHz (up to 3.1GHz) OS: Windows 10 64-bit

@MikuAuahDark
MikuAuahDark / honoka2.lua
Last active September 19, 2017 10:24
libhonoka2 Lua(JIT) FFI binding
-- libhonoka2 FFI binding
-- Copyright (c) 2038 Dark Energy Processor Corporation
--
-- Permission is hereby granted, free of charge, to any person obtaining a
-- copy of this software and associated documentation files (the "Software"),
-- to deal in the Software without restriction, including without limitation
-- the rights to use, copy, modify, merge, publish, distribute, sublicense,
-- and/or sell copies of the Software, and to permit persons to whom the
-- Software is furnished to do so, subject to the following conditions:
--
@MikuAuahDark
MikuAuahDark / lua52.lua
Created October 3, 2017 13:20
Lua 5.2 FFI Binding for Lua FFI library
-- A very basic Lua 5.2 FFI binding.
-- Tested under LuaJIT FFI, but should work under Facebook LuaFFI too
-- This assume:
-- - lua_Number is double
-- - lua_Integer is ptrdiff_t (equal to size_t?)
-- - lua_Unsigned is unsigned int
-- Released under public domain
local ffi = require("ffi")
local lua52 = ffi.load("lua52")
@MikuAuahDark
MikuAuahDark / vec.lua
Last active July 28, 2018 03:01
Lua GLSL-like vector & matrix (with vector swizzle mask)
-- luagvect
-- GLSL-like vector & matrix function
local vec = {}
local math = require("math")
------------------
-- Vector class --
------------------
@MikuAuahDark
MikuAuahDark / nocheat.c
Last active May 13, 2021 03:09
GTASA Cheat Input Disable
/*
* Prevents you from using cheat codes like HESOYAM, DDDDDDDAAAAAADWD, ...
* Only tested on gta-sa.exe US 1.0 HOODLUM and COMPACT.
* Please change address at line 13 if you're not using US v1.0 executable
*
* Compile with
* clang -m32 -shared -o nocheat.asi nocheat.c
*/
#define WIN32_LEAN_AND_MEAN