(draft; work in progress)
See also:
- Compilers
- Program analysis:
- Dynamic analysis - instrumentation, translation, sanitizers
(draft; work in progress)
See also:
// gcc test.c `pkg-config --cflags --libs gtk+-3.0 gdk-3.0` -lX11 && ./a.out | |
#include <X11/Xlib.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <gtk/gtk.h> | |
#include <gdk/gdkx.h> | |
static void my_gtk_realize(GtkWidget* widget, gpointer user) |
local red = Color(255,0,0) | |
local green = Color(0,255,0) | |
local function log(color,s) | |
MsgC(color,s .. "\n") | |
end | |
function mdmp(out) | |
local files,_ = file.Find("*.mdmp","BASE_PATH") | |
if out then log(red,"Found " .. #files .. " files!") end |
#!/usr/bin/env python | |
import os | |
import sys | |
from ctypes import CDLL | |
from subprocess import call | |
# Morrowind | |
os.environ["SteamAppId"] = "22320" | |
# Enable Steam Overlay |
FROM debian:jessie | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
ca-certificates \ | |
curl \ | |
binutils-dev \ | |
libmad0-dev \ | |
libgtk2.0-dev \ | |
libasound-dev \ |
Updated: Just use qutebrowser (and disable javascript). The web is done for.
-- Global 'nil' value | |
NIL = {} | |
-- Localise for faster access | |
local pcall = pcall | |
local string_len = string.len | |
local string_sub = string.sub | |
local string_find = string.find |
function unrequire( modName ) | |
if( not modName ) then return end | |
local _R = debug.getregistry() | |
local moduleMetatable = _R["_LOADLIB"] | |
package.loaded[ modName ] = nil | |
_G[ modName ] = nil | |
for k, ud in pairs( _R ) do | |
if( (type(k) == "string") and string.find( k, "^LOADLIB: .+gm.._" .. modName .. "_.+%.dll$" ) and (type(ud) == "_LOADLIB") and (getmetatable(ud) == moduleMetatable) ) then | |
print( "Unloading: " .. k ) |
<?php | |
/* | |
Gmod Command (Including quotes!): | |
lua_error_url "http://example.com/log_errors.php" | |
Expected POST data | |
Array | |
( | |
[v] => 4 |
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