Skip to content

Instantly share code, notes, and snippets.

View Henningstone's full-sized avatar

Henningstone Henningstone

View GitHub Profile
@Henningstone
Henningstone / 0001-bam-0.5-support.patch
Created May 7, 2018 22:46
Apply this to a teeworlds 0.6 source to get bam 0.5 support
From ea85a6406deabaad98a81ebd2c9ce7bfb521b949 Mon Sep 17 00:00:00 2001
From: Henningstone <[email protected]>
Date: Mon, 24 Oct 2016 01:40:00 +0200
Subject: [PATCH] bam 0.5 support
---
bam.lua | 2 +-
configure.lua | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
@Henningstone
Henningstone / deepcopy.lua
Created January 19, 2018 18:05 — forked from Deco/deepcopy.lua
Lua Non-recursive Deep-copy
--[[ deepcopy.lua
Deep-copy function for Lua - v0.2
==============================
- Does not overflow the stack.
- Maintains cyclic-references
- Copies metatables
- Maintains common upvalues between copied functions (for Lua 5.2 only)
TODO
@Henningstone
Henningstone / webtail.py
Created August 14, 2017 04:04 — forked from scoffey/webtail.py
HTTP server that provides a web interface to run "tail" on a file, like the Unix command
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
HTTP server that provides a web interface to run "tail" on a file,
like the Unix command.
This is a standalone script. No external dependencies required.
How to invoke:

Exploiting Lua 5.1 on 32-bit Windows

The following Lua program generates a Lua bytecode program called ignore-unsigned-sga.fnt, which in turn loads a DLL from within an extremely locked down Lua 5.1 sandbox in a program called RelicCOH2.exe. The remainder of this document attempts to explain how this program works by a whirlwind tour of relevent bits of the Lua 5.1 virtual machine.

if string.dump(function()end):sub(1, 12) ~= "\27Lua\81\0\1\4\4\4\8\0" then
  error("This generator requires a 32-bit version of Lua 5.1")
end

local function outer()
  local magic -- In bytecode, the stack slot corresponding to this local is changed
@Henningstone
Henningstone / CLionMakeLists-gen.sh
Created December 16, 2016 22:09
A bashscript which generates the CMakeLists.txt that CLion requires for indexing your files [made for teeworlds]
#!/bin/bash
#
# (c) 2016 Henritees
# https://github.com/Henningstone
#
FORCE=0
BASEDIR="."
CML="CMakeLists.txt"
@Henningstone
Henningstone / 0001-Basic-NetGUI-implementation.patch
Last active April 16, 2016 21:48
Patch to implement tw_netgui version 0.1-b.3-rev1
From 24de4ea3e85ba68c31d3ebd110fae112a1be7f1b Mon Sep 17 00:00:00 2001
From: Henningstone <[email protected]>
Date: Mon, 28 Dec 2015 22:19:36 +0100
Subject: [PATCH] Basic NetGUI implementation
---
datasrc/network.py | 107 ++++++++++
src/engine/client/client.cpp | 8 +
src/game/client/components/menus.h | 3 +-
src/game/client/components/menus_ingame.cpp | 142 +++++++++++++