Skip to content

Instantly share code, notes, and snippets.

View ghorsington's full-sized avatar
🥕
🐴

Geoffrey Horsington ghorsington

🥕
🐴
View GitHub Profile
@ghorsington
ghorsington / dabblet.css
Last active October 26, 2020 10:06
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
using System.Collections.Generic;
using System.Linq;
using Mono.Cecil;
namespace MagicCarrot
{
// Fixes random hangups in Illusion's new game
// Why? I dunno lol
public static class MagicCarrotPatch
{
@ghorsington
ghorsington / win32_hook.h
Last active May 24, 2025 05:18
EAT and IAT hook
/*
* EAT-based hooking for x86/x64.
*
* Big thanks to ez (https://github.com/ezdiy/) for making this!
*
* Creates "hooks" by modifying the module's export address table.
* The procedure works in three main parts:
*
* 1. Reading the module's PE file and getting all exported functions.
* 2. Finding the right function to "hook" by simple address lookup
using System;
using System.ComponentModel;
using System.IO;
using System.Runtime.InteropServices;
namespace GhettoPipes
{
/// <summary>
/// Original version from https://www.pinvoke.net/default.aspx/kernel32/CreateNamedPipe.html
/// This is a minor refactor of the original NamedPipe implementation that uses `unsafe` for faster
@ghorsington
ghorsington / pipes.cs
Created February 27, 2019 20:41
A simple ghetto named pipe implementation for win32
using System;
using System.ComponentModel;
using System.IO;
using System.Runtime.InteropServices;
namespace GhettoPipes
{
static class Win32
{
public const uint GENERIC_READ = 0x80000000;