Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
/* | |
* Hook main() using LD_PRELOAD, because why not? | |
* Obviously, this code is not portable. Use at your own risk. | |
* | |
* Compile using 'gcc hax.c -o hax.so -fPIC -shared -ldl' | |
* Then run your program as 'LD_PRELOAD=$PWD/hax.so ./a.out' | |
*/ | |
#define _GNU_SOURCE | |
#include <stdio.h> |
Source material: | |
http://security.stackexchange.com/questions/24444/what-is-the-most-hardened-set-of-options-for-gcc-compiling-c-c | |
https://wiki.gentoo.org/wiki/Hardened_Gentoo | |
https://wiki.debian.org/Hardening | |
================================================================================================================> | |
GCC Security related flags and options: | |
CFLAGS="-fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2" | |
LDFLAGS="-Wl,-z,now -Wl,-z,relro" |
package auth | |
import ( | |
"encoding/json" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net" | |
"net/http" | |
"net/url" |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000