Class: WinRM::PSRP::Fragment
- Inherits:
-
Object
- Object
- WinRM::PSRP::Fragment
- Defined in:
- lib/winrm/psrp/fragment.rb
Overview
PowerShell Remoting Protocol message fragment.
Instance Attribute Summary collapse
-
#blob ⇒ Object
readonly
Returns the value of attribute blob.
-
#end_fragment ⇒ Object
readonly
Returns the value of attribute end_fragment.
-
#fragment_id ⇒ Object
readonly
Returns the value of attribute fragment_id.
-
#object_id ⇒ Object
readonly
Returns the value of attribute object_id.
-
#start_fragment ⇒ Object
readonly
Returns the value of attribute start_fragment.
Instance Method Summary collapse
-
#bytes ⇒ Array<Byte>
Returns the raw PSRP message bytes ready for transfer to Windows inside a WinRM message.
-
#initialize(object_id, blob, fragment_id = 0, start_fragment = true, end_fragment = true) ⇒ Fragment
constructor
Creates a new PSRP message fragment.
Constructor Details
#initialize(object_id, blob, fragment_id = 0, start_fragment = true, end_fragment = true) ⇒ Fragment
Creates a new PSRP message fragment
27 28 29 30 31 32 33 |
# File 'lib/winrm/psrp/fragment.rb', line 27 def initialize(object_id, blob, fragment_id = 0, start_fragment = true, end_fragment = true) @object_id = object_id @blob = blob @fragment_id = fragment_id @start_fragment = start_fragment @end_fragment = end_fragment end |
Instance Attribute Details
#blob ⇒ Object (readonly)
Returns the value of attribute blob.
35 36 37 |
# File 'lib/winrm/psrp/fragment.rb', line 35 def blob @blob end |
#end_fragment ⇒ Object (readonly)
Returns the value of attribute end_fragment.
35 36 37 |
# File 'lib/winrm/psrp/fragment.rb', line 35 def end_fragment @end_fragment end |
#fragment_id ⇒ Object (readonly)
Returns the value of attribute fragment_id.
35 36 37 |
# File 'lib/winrm/psrp/fragment.rb', line 35 def fragment_id @fragment_id end |
#object_id ⇒ Object (readonly)
Returns the value of attribute object_id.
35 36 37 |
# File 'lib/winrm/psrp/fragment.rb', line 35 def object_id @object_id end |
#start_fragment ⇒ Object (readonly)
Returns the value of attribute start_fragment.
35 36 37 |
# File 'lib/winrm/psrp/fragment.rb', line 35 def start_fragment @start_fragment end |
Instance Method Details
#bytes ⇒ Array<Byte>
Returns the raw PSRP message bytes ready for transfer to Windows inside a WinRM message.
40 41 42 43 44 45 46 47 48 |
# File 'lib/winrm/psrp/fragment.rb', line 40 def bytes [ int64be(object_id), int64be(fragment_id), end_start_fragment, int16be(blob.length), blob ].flatten end |