Meatballs1/metasploit-framework — pull request #48 by sempervictus (2014-05-11 00:51:57+00:00)
Title: Reconstruct methods in Msf::Post::Powershell

Not sure if this was intended, but the PSH post module got pretty
gutted in translation. There's other code which depends on the
functionality which was removed, and psh_exec is actually intended
to be used in sessions for psuedo-interactive psh work (until
handles are returned to meterpter anyway). The version used as
a base for the module in this branch is likely older, or i may
never have committed my updates to master. In any case, this PR
should resolve all of that.

This commit restores powershell post functionality and removes old
methods which are redunant with the Rex implementation. Checks
are performed again before passing commands to -encodedcommand and
this version uses a newer validation for base64 encoding which
should be moved to Rex::Text.is_base64? once its confirmed working.