-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues with the cmd module on Windows
stderr is no longer piped to stdout by default for cmd.run Scripts are called using the -File paramter for powershell.exe stderr is cleared if it contains CLIXML (only for encoded commands) cmd.powershell now accepts lists as commands Makes sure returned JSON data is valid before trying to load it Strips whitespace from the stdout in win_runas
- Loading branch information
Showing
7 changed files
with
316 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Fixes multiple issues with the cmd module on Windows. ``stderr`` is no | ||
longer piped to ``stdout`` by default on ``cmd.run``. Scripts are called | ||
using the ``-File`` parameter to the ``powershell.exe`` binary. ``CLIXML`` | ||
data in stderr is now removed (only applies to encoded commands). Commands can | ||
now be sent to ``cmd.powershell`` as a list. Makes sure JSON data returned is | ||
valid. Strips whitespace from the return when using ``runas``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.