Skip to content

Instantly share code, notes, and snippets.

View TheIndra55's full-sized avatar

Indra TheIndra55

View GitHub Profile
@TheIndra55
TheIndra55 / shaders.py
Created August 10, 2023 23:30
Extract sources from Feral Interactive "shader_overrides.db"
import os
import sqlite3
import zlib
con = sqlite3.connect("shader_overrides.db")
con.row_factory = sqlite3.Row
cur = con.cursor()
cur.execute("SELECT id, source FROM shaders")
{
"resource": "hardcap",
"count": 25792
}
{
"resource": "_cfx_internal",
"count": 25792
}
{
"resource": "sessionmanager",
@TheIndra55
TheIndra55 / decryption.js
Last active March 8, 2022 15:42
Discourse user-api-keys decryption
import { privateDecrypt, constants } from "crypto"
import fs from "fs"
import fetch from "node-fetch"
const input = `...`
// decrypt payload
const privateKey = fs.readFileSync("private.key")
const data = new Buffer.from(input, "base64")
@TheIndra55
TheIndra55 / eventdebug.cpp
Last active January 9, 2024 11:42
EventDebug
struct EventVar
{
char* name;
int offset; // offset in eventvars array
};
struct UnsavedVar
{
char* name;
int* var;
BytesToOctets(ipv6.GetAddressBytes());
public static ushort[] BytesToOctets(byte[] bytes)
{
var octets = new ushort[8];
var j = 0;
for(var i = 0; i < bytes.Length; i += 2)
{
octets[j] = (ushort)((bytes[i] << 8) | bytes[i + 1]);
RequestModel(`prop_cs_bucket_s`)
RequestModel(`prop_cs_mop_s`)
RequestAnimDict("missfbi_s4mop")
RequestAnimSet("move_ped_bucket")
RequestAnimSet("move_ped_wpn_bucket")
Wait(1000)
local bucket = CreateObjectNoOffset(`prop_cs_bucket_s`, GetEntityCoords(PlayerPedId()), true, true, false)
local mop = CreateObjectNoOffset(`prop_cs_mop_s`, GetEntityCoords(PlayerPedId()), true, true, false)
@TheIndra55
TheIndra55 / load gtav interior props.lua
Last active June 3, 2018 19:10
GTAV interior props
-- get the interior id of floyd's house
local interiorid = GetInteriorAtCoords(-1157.1294, -1523.0276, 9.6327)
-- load the interior props
EnableInteriorProp(interiorid, "swap_clean_apt")
EnableInteriorProp(interiorid, "swap_wade_sofa")
EnableInteriorProp(interiorid, "layer_sextoys_a")
-- always refresh the interior or they won't appear
RefreshInterior(interiorid)