Class: WinRM::PSRP::PowershellOutputDecoder
- Inherits:
-
Object
- Object
- WinRM::PSRP::PowershellOutputDecoder
- Defined in:
- lib/winrm/psrp/powershell_output_decoder.rb
Overview
Handles decoding a raw powershell output response
Instance Method Summary collapse
-
#decode(message) ⇒ String
rubocop:disable Metrics/CyclomaticComplexity Decode the raw SOAP output into decoded PSRP message, Removes BOM and replaces encoded line endings.
Instance Method Details
#decode(message) ⇒ String
rubocop:disable Metrics/CyclomaticComplexity Decode the raw SOAP output into decoded PSRP message, Removes BOM and replaces encoded line endings
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/winrm/psrp/powershell_output_decoder.rb', line 28 def decode() case .type when WinRM::PSRP::Message::MESSAGE_TYPES[:pipeline_output] decode_pipeline_output() when WinRM::PSRP::Message::MESSAGE_TYPES[:runspacepool_host_call] decode_host_call() when WinRM::PSRP::Message::MESSAGE_TYPES[:pipeline_host_call] decode_host_call() when WinRM::PSRP::Message::MESSAGE_TYPES[:error_record] decode_error_record() when WinRM::PSRP::Message::MESSAGE_TYPES[:pipeline_state] if .parsed_data.pipeline_state == WinRM::PSRP::MessageData::PipelineState::FAILED decode_error_record() end end end |