Skip to content

Instantly share code, notes, and snippets.

@louieli
louieli / hook_elf.c
Last active August 29, 2015 14:22 — forked from astarasikov/hook_elf.c
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <dlfcn.h>
#include <errno.h>
#include <sys/mman.h>
#include <unistd.h>
@louieli
louieli / install.sh
Last active August 29, 2015 13:56
自安装脚本
# tar cjf hello.tar.bz2 hello
# cat install.sh
#!/bin/bash
install_dir=/tmp/hello
if [[ -e $install_dir ]];then
rm -rf $install_dir && make $install_dir
else
mkdir $install_dir
fi