This was originally a dropper for meterpreter, but I reworked it into arch_cmd exploit to have the mechanism be more transparent, and have the vulnerability work on more platforms.

Although the dependency on base64 and GNU-sed do limit this, as neither are present on BSD systems (base64 is but uses -D instead of -d, although upon further inspection right now they both accept --decode). 

I would welcome any ideas on how to write to a file without output redirections ">" using common utilities.