Sgen.c compiles shellcodes from NASM source. Tested on FreeBSD and Linux but should work with most unix systems with nasm.