Skip to content

Instantly share code, notes, and snippets.

View supechicken's full-sized avatar

SupeChicken666 supechicken

View GitHub Profile
@supechicken
supechicken / crew-audit.c
Last active April 28, 2025 20:34
Simple audit library for intercepting/modifying library requests in glibc
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <link.h>
#include <linux/limits.h>
#include <gnu/libc-version.h>
char *crew_prefix, crew_glibc_prefix[PATH_MAX], crew_libc_so_path[PATH_MAX];
@supechicken
supechicken / websocket.c
Created June 6, 2025 17:26
Simple WebSocket library written in C
#include "websocket.h"
#define HTTP_WRONG_PROTOCOL_HEADERS \
"HTTP/1.1 405 Method Not Allowed\r\n" \
"Connection: closed\r\n" \
"\r\n"
#define HTTP_UPGRADE_HEADERS \
"HTTP/1.1 101 Switching Protocols\r\n" \
"Connection: upgrade\r\n" \