rapid7/metasploit-framework — pull request #2412 by mwulftange (2013-09-23 20:22:38+00:00)
Title: Add printf CmdStager

This CmdStager uses `printf`’s support for octal escapes to drop an ELF payload. Since the [support for octal escapes is part of POSIX’ `printf`](http://www.unix.com/man-page/POSIX/1posix/printf/), this CmdStager should work in all POSIX compliant shells.

The idea of a `printf` CmdStager was originally discussed in rapid7/metasploit-framework#2371 as the required options `-e` and `-n` for the proposed `echo` CmdStager are not implemented in all shells, e. g., [*csh*’s `echo` does neither have `-e` nor `-n`](http://pic.dhe.ibm.com/infocenter/aix/v7r1/topic/com.ibm.aix.cmds/doc/aixcmds2/echo.htm). However, *csh* does have a POSIX-compliant `printf`.