1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-06-15 15:03:41 +02:00
James Lee 82e64ff406 Fix execution with spaces in args by using sh -c
In posix, a command like "echo 'foo bar'" would previously get parsed
out into arguments for execve like [ "echo", "'foo", "bar'" ] which
obviously isn't what you want. After this commit, it sticks the whole
thing in an arg to sh so the execve call ends up looking like
  execve("/bin/sh", ["sh", "-c", "echo 'foo bar'"], [/* 26 vars */]) = 0
This is still a little less than ideal because shell escapes become a
problem; fortunately, that's easy to deal with on the client side as
long as module developers take it into account.
2012-05-13 14:55:57 -06:00
..
2010-04-03 05:21:15 +00:00
2012-02-18 12:46:13 -07:00