jvennix-r7/metasploit-framework — pull request #3 by jvazquez-r7 (2013-08-24 15:00:42+00:00)
Title: Work osx

Hi @jvennix-r7,

This pull request mainly switches from cmd_exec to session.shell_command_token on do_cleanup_once. The reason of doing that is which the cmd_exec doesn't allow to pass a session, and the cleanup is always being done in the original unprivileged session. Which isn't the intended case for the on_new_session callback.

On the other hand, in this way the cleanup can be done without sending the sudoed payload to the background.