Ragg2 is a frontend for r_egg, compile programs into tiny binaries for x86-32/64 and arm. This tool is experimental and it is a rewrite of the old rarc2 and rarc2-tool programs as a library and integrated with r_asm and r_bin. Programs generated by r_egg are relocatable and can be injected in a running process or on-disk binary file.
ragg2 [-FOLsrxvh] [-a arch] [-b bits] [-k os] [-o file] [-I /] [-i sc] [-e enc] [-B hex] [-c k=v] [-C file] [-dDw v] [-p pad] file|f.asm|-
-a [arch] select architecture (x86, mips, arm) -b [bits] register size (32, 64, ..) -k [os] operating system's kernel (linux,bsd,osx,w32) -f [format] output format (raw, pe, elf, mach0) -F output native format (osx=mach0, linux=elf, ..) -o [file] output file -O use default output file (filename without extension or a.out) -I [path] add include path -L list all plugins (shellcodes and encoders) -i [shellcode] include shellcode plugin, uses options. see -L -e [encoder] use specific encoder. see -L -B [hexpairs] append some hexpair bytes -c [k=v] set configuration options -C [file] append contents of file -d [off:dword] patch dword (4 bytes) at given offset -D [off:qword] patch qword (8 bytes) at given offset -w [off:hex] patch hexpairs at given offset -p [padding] add padding after compilation (padding=n10s32) ntas : begin nop, trap, 'a', sequence NTAS : same as above, but at the end -P [size] prepend debrujn pattern -s show assembler -r show raw bytes instead of hexpairs -x execute -v show version