rapid7/metasploit-framework — pull request #460 by jlee-r7 (2012-06-08 04:36:37+00:00)
Title: Fixes command parsing in Post::Common

The meterpreter API wants arguments in a seperate string (not an array,
mind you) just so it can concatenate them on the server side.
Originally, I worked around that by using Shellwords.shellwords to pull
out the first token. But! Shellwords.shellwords inexplicably and
inexcusably removes backslashes in ways that make it impossible to quote
things on Windows. This commit works around both of those things.