Created
October 30, 2015 00:00
-
-
Save jkeiser/2a7c401f5ed4ad651cfb to your computer and use it in GitHub Desktop.
Processed xml diff
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
--- ruby.xml.out 2015-10-29 16:55:27.000000000 -0700 | |
+++ winrx.xml.out 2015-10-29 16:55:27.000000000 -0700 | |
@@ -1,8 +1,8 @@ | |
POST /wsman HTTP/1.1 | |
+Connection: Keep-Alive | |
Content-Type: application/soap+xml;charset=UTF-8 | |
-Authorization: Basic dmFncmFudDp2YWdyYW50 | |
-User-Agent: Ruby WinRM Client (2.6.0.1, ruby 2.0.0 (2015-04-13)) | |
-Accept: */* | |
+Authorization: Negotiate TlRMTVNTUAADAAAAGAAYAKIAAABIAUgBugAAAB4AHgBYAAAADgAOAHYAAAAeAB4AhAAAABAAEAACAgAAFYKI4gYDgCUAAAAPRFdTF22TL67/uIpCX3UibFcASQBOAC0ANQBFADcAOQBTAFIAOQBDADMAMgAyAHYAYQBnAHIAYQBuAHQAVwBJAE4ALQA1AEUANwA5AFMAUgA5AEMAMwAyADIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uE93iucL38Bsn6t2Gq5gEBAAAAAAAAbu0aF+kR0QH50X7dCJnEDAAAAAACAB4AVwBJAE4ALQA4AEoANwA0AEQASQAxAEcANABTAE8AAQAeAFcASQBOAC0AOABKADcANABEAEkAMQBHADQAUwBPAAQAHgBXAEkATgAtADgASgA3ADQARABJADEARwA0AFMATwADAB4AVwBJAE4ALQA4AEoANwA0AEQASQAxAEcANABTAE8ABwAIAG7tGhfpEdEBBgAEAAIAAAAIADAAMAAAAAAAAAAAAAAAADAAAPX/riDUqfP2y6J+eY0LgWzWiaSNvQjM0tJIFtL6sWyNCgAQAAAAAAAAAAAAAAAAAAAAAAAJACgASABUAFQAUAAvADEAOQAyAC4AMQA2ADgALgAxADMANwAuADIAMgAyAAAAAAAAAAAAAAAAAETvbOC84CN+rr5pJecv7WI= | |
+User-Agent: Microsoft WinRM Client | |
Host: 192.168.137.222:5985 | |
> Request: | |
@@ -12,16 +12,19 @@ | |
{"Action"=>"http://schemas.xmlsoap.org/ws/2004/09/transfer/Create", | |
"DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
- "MaxEnvelopeSize"=>"153600", | |
+ "MaxEnvelopeSize"=>"512000", | |
"MessageID"=>"MessageID1", | |
- "OperationTimeout"=>"PT60S", | |
+ "OperationID"=>"OperationID1", | |
+ "OperationTimeout"=>"PT60.000S", | |
"OptionSet"=> | |
- {"Option"=>[{"WINRS_NOPROFILE"=>"FALSE"}, {"WINRS_CODEPAGE"=>"65001"}]}, | |
+ {"Option"=>[{"WINRS_NOPROFILE"=>"FALSE"}, {"WINRS_CODEPAGE"=>"437"}]}, | |
"ReplyTo"=> | |
{"Address"=> | |
"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
+ "SequenceId"=>"1", | |
+ "SessionId"=>"SessionId1", | |
"To"=>"http://192.168.137.222:5985/wsman"}} | |
HTTP/1.1 200 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
@@ -40,7 +43,7 @@ | |
"IdleTimeOut"=>"PT7200.000S", | |
"InputStreams"=>"stdin", | |
"OutputStreams"=>"stdout stderr", | |
- "Owner"=>"vagrant", | |
+ "Owner"=>"WIN-8J74DI1G4SO\\vagrant", | |
"ResourceUri"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"ShellId"=>"ShellId1", | |
@@ -49,14 +52,15 @@ | |
"Header"=> | |
{"Action"=>"http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse", | |
"MessageID"=>"MessageID2", | |
+ "OperationID"=>"OperationID1", | |
"RelatesTo"=>"MessageID1", | |
+ "SequenceId"=>"1", | |
"To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"lang"=>"en-US"} | |
POST /wsman HTTP/1.1 | |
+Connection: Keep-Alive | |
Content-Type: application/soap+xml;charset=UTF-8 | |
-Authorization: Basic dmFncmFudDp2YWdyYW50 | |
-User-Agent: Ruby WinRM Client (2.6.0.1, ruby 2.0.0 (2015-04-13)) | |
-Accept: */* | |
+User-Agent: Microsoft WinRM Client | |
Host: 192.168.137.222:5985 | |
> Request: | |
@@ -65,19 +69,19 @@ | |
{"Action"=>"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Command", | |
"DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
- "MaxEnvelopeSize"=>"153600", | |
+ "MaxEnvelopeSize"=>"512000", | |
"MessageID"=>"MessageID3", | |
- "OperationTimeout"=>"PT60S", | |
- "OptionSet"=> | |
- {"Option"=> | |
- [{"WINRS_CONSOLEMODE_STDIN"=>"TRUE"}, | |
- {"WINRS_SKIP_CMD_SHELL"=>"FALSE"}]}, | |
+ "OperationID"=>"OperationID2", | |
+ "OperationTimeout"=>"PT60.000S", | |
+ "OptionSet"=>{"Option"=>{"WINRS_CONSOLEMODE_STDIN"=>"TRUE"}}, | |
"ReplyTo"=> | |
{"Address"=> | |
"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"SelectorSet"=>{"Selector"=>{"ShellId"=>"ShellId1"}}, | |
+ "SequenceId"=>"1", | |
+ "SessionId"=>"SessionId1", | |
"To"=>"http://192.168.137.222:5985/wsman"}} | |
HTTP/1.1 200 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
@@ -89,34 +93,38 @@ | |
{"Action"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandResponse", | |
"MessageID"=>"MessageID4", | |
+ "OperationID"=>"OperationID2", | |
"RelatesTo"=>"MessageID3", | |
+ "SequenceId"=>"1", | |
"To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"lang"=>"en-US"} | |
POST /wsman HTTP/1.1 | |
+Connection: Keep-Alive | |
Content-Type: application/soap+xml;charset=UTF-8 | |
-Authorization: Basic dmFncmFudDp2YWdyYW50 | |
-User-Agent: Ruby WinRM Client (2.6.0.1, ruby 2.0.0 (2015-04-13)) | |
-Accept: */* | |
+User-Agent: Microsoft WinRM Client | |
Host: 192.168.137.222:5985 | |
> Request: | |
{"Body"=> | |
{"Receive"=> | |
- {"DesiredStream"=> | |
- {"CommandId"=>"CommandId1", "content"=>"stdout stderr"}}}, | |
+ {"DesiredStream"=>{"CommandId"=>"CommandId1", "content"=>"stdout stderr"}, | |
+ "SequenceId"=>"0"}}, | |
"Header"=> | |
{"Action"=>"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Receive", | |
"DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
- "MaxEnvelopeSize"=>"153600", | |
+ "MaxEnvelopeSize"=>"512000", | |
"MessageID"=>"MessageID5", | |
- "OperationTimeout"=>"PT60S", | |
+ "OperationID"=>"OperationID3", | |
+ "OperationTimeout"=>"PT60.000S", | |
"ReplyTo"=> | |
{"Address"=> | |
"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"SelectorSet"=>{"Selector"=>{"ShellId"=>"ShellId1"}}, | |
+ "SequenceId"=>"1", | |
+ "SessionId"=>"SessionId1", | |
"To"=>"http://192.168.137.222:5985/wsman"}} | |
HTTP/1.1 200 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
@@ -127,89 +135,34 @@ | |
{"ReceiveResponse"=> | |
{"CommandState"=> | |
{"CommandId"=>"CommandId1", | |
- "ExitCode"=>"0", | |
+ "ExitCode"=>"100", | |
"State"=> | |
- "http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done"}}}, | |
+ "http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done"}, | |
+ "Stream"=> | |
+ [{"CommandId"=>"CommandId1", "End"=>"true", "Name"=>"stdout"}, | |
+ {"CommandId"=>"CommandId1", "End"=>"true", "Name"=>"stderr"}]}}, | |
"Header"=> | |
{"Action"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/ReceiveResponse", | |
"MessageID"=>"MessageID6", | |
+ "OperationID"=>"OperationID3", | |
"RelatesTo"=>"MessageID5", | |
+ "SequenceId"=>"1", | |
"To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"lang"=>"en-US"} | |
POST /wsman HTTP/1.1 | |
+Connection: Keep-Alive | |
Content-Type: application/soap+xml;charset=UTF-8 | |
-Authorization: Basic dmFncmFudDp2YWdyYW50 | |
-User-Agent: Ruby WinRM Client (2.6.0.1, ruby 2.0.0 (2015-04-13)) | |
-Accept: */* | |
-Host: 192.168.137.222:5985 | |
- | |
-> Request: | |
-{"Body"=> | |
- {"Signal"=> | |
- {"Code"=> | |
- "http://schemas.microsoft.com/wbem/wsman/1/windows/shell/signal/terminate", | |
- "CommandId"=>"CommandId1"}}, | |
- "Header"=> | |
- {"Action"=>"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Signal", | |
- "DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
- "Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
- "MaxEnvelopeSize"=>"153600", | |
- "MessageID"=>"MessageID7", | |
- "OperationTimeout"=>"PT60S", | |
- "ReplyTo"=> | |
- {"Address"=> | |
- "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
- "ResourceURI"=> | |
- "http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
- "SelectorSet"=>{"Selector"=>{"ShellId"=>"ShellId1"}}, | |
- "To"=>"http://192.168.137.222:5985/wsman"}} | |
-HTTP/1.1 200 | |
-Content-Type: application/soap+xml;charset=UTF-8 | |
-Server: Microsoft-HTTPAPI/2.0 | |
- | |
-> Response: | |
-{"Body"=>{"SignalResponse"=>{}}, | |
- "Header"=> | |
- {"Action"=> | |
- "http://schemas.microsoft.com/wbem/wsman/1/windows/shell/SignalResponse", | |
- "MessageID"=>"MessageID8", | |
- "RelatesTo"=>"MessageID7", | |
- "To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
- "lang"=>"en-US"} | |
-POST /wsman HTTP/1.1 | |
-Content-Type: application/soap+xml;charset=UTF-8 | |
-Authorization: Basic dmFncmFudDp2YWdyYW50 | |
-User-Agent: Ruby WinRM Client (2.6.0.1, ruby 2.0.0 (2015-04-13)) | |
-Accept: */* | |
+User-Agent: Microsoft WinRM Client | |
Host: 192.168.137.222:5985 | |
> Request: | |
{"Body"=>{}, | |
"Header"=> | |
- {"Action"=>"http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete", | |
- "DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
- "Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
- "MaxEnvelopeSize"=>"153600", | |
- "MessageID"=>"MessageID9", | |
- "OperationTimeout"=>"PT60S", | |
- "ReplyTo"=> | |
- {"Address"=> | |
- "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
- "ResourceURI"=> | |
- "http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
- "SelectorSet"=>{"Selector"=>{"ShellId"=>"ShellId1"}}, | |
- "To"=>"http://192.168.137.222:5985/wsman"}} | |
-HTTP/1.1 200 | |
-Content-Type: application/soap+xml;charset=UTF-8 | |
+ {"Action"=>"http://schemas.microsoft.com/wbem/wsman/1/wsman/End", | |
+ "MessageID"=>"MessageID7", | |
+ "OperationID"=>"OperationID3", | |
+ "ResourceURI"=>"http://schemas.microsoft.com/wbem/wsman/1/wsman/FullDuplex", | |
+ "To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}} | |
+HTTP/1.1 204 | |
Server: Microsoft-HTTPAPI/2.0 | |
- | |
-> Response: | |
-{"Body"=>{}, | |
- "Header"=> | |
- {"Action"=>"http://schemas.xmlsoap.org/ws/2004/09/transfer/DeleteResponse", | |
- "MessageID"=>"MessageID10", | |
- "RelatesTo"=>"MessageID9", | |
- "To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
- "lang"=>"en-US"} | |
- |
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
require 'xmlsimple' | |
require 'pp' | |
def get_rid_of_crap!(xml) | |
case xml | |
when Array | |
if xml.size == 1 | |
get_rid_of_crap!(xml[0]) | |
else | |
xml.map! { |child| get_rid_of_crap!(child) } | |
end | |
when Hash | |
result = {} | |
xml.keys.sort.each do |key| | |
result[key.split(':')[-1]] = xml[key] unless key.start_with?('xmlns:') || key == 'xmlns' | |
end | |
if result.keys.sort == %w(content mustUnderstand) | |
result = get_rid_of_crap!(result['content']) | |
elsif result.keys.sort == %w(Name content) | |
result = get_rid_of_crap!({ result['Name'] => result['content'] }) | |
elsif result.keys.sort == %w(content) | |
result = get_rid_of_crap!(result['content']) | |
else | |
result.each do |key,value| | |
value = get_rid_of_crap!(value) | |
if value =~ /^(uuid:)?([A-Fa-f0-9-]{36})$/ | |
uuid = $2 | |
@uuid_map[uuid] ||= begin | |
@next_uuid[key] ||= 0 | |
@next_uuid[key] += 1 | |
"#{key}#{@next_uuid[key]}" | |
end | |
value = @uuid_map[uuid] | |
end | |
result[key] = value | |
end | |
end | |
result | |
else | |
xml | |
end | |
end | |
ARGV.each do |file| | |
@next_uuid = {} | |
@uuid_map = {} | |
puts file | |
File.open("#{file}.out", "w") do |f| | |
IO.read(file).lines.each_with_index do |line, index| | |
if line.start_with?("<") | |
is_request = line.end_with?('HTTP/1.1') | |
if line =~ /^(.+>)(HTTP\/1.1 \d+)$/ | |
line, extra = $1, $2 | |
f.puts "> Request:" | |
is_request = true | |
else | |
line, extra = $1, $2 if line =~ /^(.+>)(POST \/wsman HTTP\/1.1)$/ | |
f.puts "> Response:" | |
end | |
xml = XmlSimple.xml_in(line) | |
xml = get_rid_of_crap!(xml) | |
old_out = $> | |
$> = f | |
begin | |
pp xml | |
ensure | |
$> = old_out | |
end | |
f.puts extra | |
else | |
next if line =~ /^(Date|Content-Length):/ | |
f.puts line | |
end | |
end | |
end | |
end |
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
POST /wsman HTTP/1.1 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Authorization: Basic dmFncmFudDp2YWdyYW50 | |
User-Agent: Ruby WinRM Client (2.6.0.1, ruby 2.0.0 (2015-04-13)) | |
Accept: */* | |
Host: 192.168.137.222:5985 | |
> Request: | |
{"Body"=> | |
{"Shell"=>{"InputStreams"=>"stdin", "OutputStreams"=>"stdout stderr"}}, | |
"Header"=> | |
{"Action"=>"http://schemas.xmlsoap.org/ws/2004/09/transfer/Create", | |
"DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"MaxEnvelopeSize"=>"153600", | |
"MessageID"=>"MessageID1", | |
"OperationTimeout"=>"PT60S", | |
"OptionSet"=> | |
{"Option"=>[{"WINRS_NOPROFILE"=>"FALSE"}, {"WINRS_CODEPAGE"=>"65001"}]}, | |
"ReplyTo"=> | |
{"Address"=> | |
"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"To"=>"http://192.168.137.222:5985/wsman"}} | |
HTTP/1.1 200 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Server: Microsoft-HTTPAPI/2.0 | |
> Response: | |
{"Body"=> | |
{"ResourceCreated"=> | |
{"Address"=>"http://192.168.137.222:5985/wsman", | |
"ReferenceParameters"=> | |
{"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"SelectorSet"=>{"Selector"=>{"ShellId"=>"ShellId1"}}}}, | |
"Shell"=> | |
{"ClientIP"=>"192.168.137.126", | |
"IdleTimeOut"=>"PT7200.000S", | |
"InputStreams"=>"stdin", | |
"OutputStreams"=>"stdout stderr", | |
"Owner"=>"vagrant", | |
"ResourceUri"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"ShellId"=>"ShellId1", | |
"ShellInactivity"=>"P0DT0H0M0S", | |
"ShellRunTime"=>"P0DT0H0M0S"}}, | |
"Header"=> | |
{"Action"=>"http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse", | |
"MessageID"=>"MessageID2", | |
"RelatesTo"=>"MessageID1", | |
"To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"lang"=>"en-US"} | |
POST /wsman HTTP/1.1 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Authorization: Basic dmFncmFudDp2YWdyYW50 | |
User-Agent: Ruby WinRM Client (2.6.0.1, ruby 2.0.0 (2015-04-13)) | |
Accept: */* | |
Host: 192.168.137.222:5985 | |
> Request: | |
{"Body"=>{"CommandLine"=>{"Command"=>"\"exit 100\""}}, | |
"Header"=> | |
{"Action"=>"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Command", | |
"DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"MaxEnvelopeSize"=>"153600", | |
"MessageID"=>"MessageID3", | |
"OperationTimeout"=>"PT60S", | |
"OptionSet"=> | |
{"Option"=> | |
[{"WINRS_CONSOLEMODE_STDIN"=>"TRUE"}, | |
{"WINRS_SKIP_CMD_SHELL"=>"FALSE"}]}, | |
"ReplyTo"=> | |
{"Address"=> | |
"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"SelectorSet"=>{"Selector"=>{"ShellId"=>"ShellId1"}}, | |
"To"=>"http://192.168.137.222:5985/wsman"}} | |
HTTP/1.1 200 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Server: Microsoft-HTTPAPI/2.0 | |
> Response: | |
{"Body"=>{"CommandResponse"=>{"CommandId"=>"CommandId1"}}, | |
"Header"=> | |
{"Action"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandResponse", | |
"MessageID"=>"MessageID4", | |
"RelatesTo"=>"MessageID3", | |
"To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"lang"=>"en-US"} | |
POST /wsman HTTP/1.1 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Authorization: Basic dmFncmFudDp2YWdyYW50 | |
User-Agent: Ruby WinRM Client (2.6.0.1, ruby 2.0.0 (2015-04-13)) | |
Accept: */* | |
Host: 192.168.137.222:5985 | |
> Request: | |
{"Body"=> | |
{"Receive"=> | |
{"DesiredStream"=> | |
{"CommandId"=>"CommandId1", "content"=>"stdout stderr"}}}, | |
"Header"=> | |
{"Action"=>"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Receive", | |
"DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"MaxEnvelopeSize"=>"153600", | |
"MessageID"=>"MessageID5", | |
"OperationTimeout"=>"PT60S", | |
"ReplyTo"=> | |
{"Address"=> | |
"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"SelectorSet"=>{"Selector"=>{"ShellId"=>"ShellId1"}}, | |
"To"=>"http://192.168.137.222:5985/wsman"}} | |
HTTP/1.1 200 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Server: Microsoft-HTTPAPI/2.0 | |
> Response: | |
{"Body"=> | |
{"ReceiveResponse"=> | |
{"CommandState"=> | |
{"CommandId"=>"CommandId1", | |
"ExitCode"=>"0", | |
"State"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done"}}}, | |
"Header"=> | |
{"Action"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/ReceiveResponse", | |
"MessageID"=>"MessageID6", | |
"RelatesTo"=>"MessageID5", | |
"To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"lang"=>"en-US"} | |
POST /wsman HTTP/1.1 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Authorization: Basic dmFncmFudDp2YWdyYW50 | |
User-Agent: Ruby WinRM Client (2.6.0.1, ruby 2.0.0 (2015-04-13)) | |
Accept: */* | |
Host: 192.168.137.222:5985 | |
> Request: | |
{"Body"=> | |
{"Signal"=> | |
{"Code"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/signal/terminate", | |
"CommandId"=>"CommandId1"}}, | |
"Header"=> | |
{"Action"=>"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Signal", | |
"DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"MaxEnvelopeSize"=>"153600", | |
"MessageID"=>"MessageID7", | |
"OperationTimeout"=>"PT60S", | |
"ReplyTo"=> | |
{"Address"=> | |
"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"SelectorSet"=>{"Selector"=>{"ShellId"=>"ShellId1"}}, | |
"To"=>"http://192.168.137.222:5985/wsman"}} | |
HTTP/1.1 200 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Server: Microsoft-HTTPAPI/2.0 | |
> Response: | |
{"Body"=>{"SignalResponse"=>{}}, | |
"Header"=> | |
{"Action"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/SignalResponse", | |
"MessageID"=>"MessageID8", | |
"RelatesTo"=>"MessageID7", | |
"To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"lang"=>"en-US"} | |
POST /wsman HTTP/1.1 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Authorization: Basic dmFncmFudDp2YWdyYW50 | |
User-Agent: Ruby WinRM Client (2.6.0.1, ruby 2.0.0 (2015-04-13)) | |
Accept: */* | |
Host: 192.168.137.222:5985 | |
> Request: | |
{"Body"=>{}, | |
"Header"=> | |
{"Action"=>"http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete", | |
"DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"MaxEnvelopeSize"=>"153600", | |
"MessageID"=>"MessageID9", | |
"OperationTimeout"=>"PT60S", | |
"ReplyTo"=> | |
{"Address"=> | |
"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"SelectorSet"=>{"Selector"=>{"ShellId"=>"ShellId1"}}, | |
"To"=>"http://192.168.137.222:5985/wsman"}} | |
HTTP/1.1 200 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Server: Microsoft-HTTPAPI/2.0 | |
> Response: | |
{"Body"=>{}, | |
"Header"=> | |
{"Action"=>"http://schemas.xmlsoap.org/ws/2004/09/transfer/DeleteResponse", | |
"MessageID"=>"MessageID10", | |
"RelatesTo"=>"MessageID9", | |
"To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"lang"=>"en-US"} | |
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
POST /wsman HTTP/1.1 | |
Connection: Keep-Alive | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Authorization: Negotiate TlRMTVNTUAADAAAAGAAYAKIAAABIAUgBugAAAB4AHgBYAAAADgAOAHYAAAAeAB4AhAAAABAAEAACAgAAFYKI4gYDgCUAAAAPRFdTF22TL67/uIpCX3UibFcASQBOAC0ANQBFADcAOQBTAFIAOQBDADMAMgAyAHYAYQBnAHIAYQBuAHQAVwBJAE4ALQA1AEUANwA5AFMAUgA5AEMAMwAyADIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uE93iucL38Bsn6t2Gq5gEBAAAAAAAAbu0aF+kR0QH50X7dCJnEDAAAAAACAB4AVwBJAE4ALQA4AEoANwA0AEQASQAxAEcANABTAE8AAQAeAFcASQBOAC0AOABKADcANABEAEkAMQBHADQAUwBPAAQAHgBXAEkATgAtADgASgA3ADQARABJADEARwA0AFMATwADAB4AVwBJAE4ALQA4AEoANwA0AEQASQAxAEcANABTAE8ABwAIAG7tGhfpEdEBBgAEAAIAAAAIADAAMAAAAAAAAAAAAAAAADAAAPX/riDUqfP2y6J+eY0LgWzWiaSNvQjM0tJIFtL6sWyNCgAQAAAAAAAAAAAAAAAAAAAAAAAJACgASABUAFQAUAAvADEAOQAyAC4AMQA2ADgALgAxADMANwAuADIAMgAyAAAAAAAAAAAAAAAAAETvbOC84CN+rr5pJecv7WI= | |
User-Agent: Microsoft WinRM Client | |
Host: 192.168.137.222:5985 | |
> Request: | |
{"Body"=> | |
{"Shell"=>{"InputStreams"=>"stdin", "OutputStreams"=>"stdout stderr"}}, | |
"Header"=> | |
{"Action"=>"http://schemas.xmlsoap.org/ws/2004/09/transfer/Create", | |
"DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"MaxEnvelopeSize"=>"512000", | |
"MessageID"=>"MessageID1", | |
"OperationID"=>"OperationID1", | |
"OperationTimeout"=>"PT60.000S", | |
"OptionSet"=> | |
{"Option"=>[{"WINRS_NOPROFILE"=>"FALSE"}, {"WINRS_CODEPAGE"=>"437"}]}, | |
"ReplyTo"=> | |
{"Address"=> | |
"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"SequenceId"=>"1", | |
"SessionId"=>"SessionId1", | |
"To"=>"http://192.168.137.222:5985/wsman"}} | |
HTTP/1.1 200 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Server: Microsoft-HTTPAPI/2.0 | |
> Response: | |
{"Body"=> | |
{"ResourceCreated"=> | |
{"Address"=>"http://192.168.137.222:5985/wsman", | |
"ReferenceParameters"=> | |
{"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"SelectorSet"=>{"Selector"=>{"ShellId"=>"ShellId1"}}}}, | |
"Shell"=> | |
{"ClientIP"=>"192.168.137.126", | |
"IdleTimeOut"=>"PT7200.000S", | |
"InputStreams"=>"stdin", | |
"OutputStreams"=>"stdout stderr", | |
"Owner"=>"WIN-8J74DI1G4SO\\vagrant", | |
"ResourceUri"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"ShellId"=>"ShellId1", | |
"ShellInactivity"=>"P0DT0H0M0S", | |
"ShellRunTime"=>"P0DT0H0M0S"}}, | |
"Header"=> | |
{"Action"=>"http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse", | |
"MessageID"=>"MessageID2", | |
"OperationID"=>"OperationID1", | |
"RelatesTo"=>"MessageID1", | |
"SequenceId"=>"1", | |
"To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"lang"=>"en-US"} | |
POST /wsman HTTP/1.1 | |
Connection: Keep-Alive | |
Content-Type: application/soap+xml;charset=UTF-8 | |
User-Agent: Microsoft WinRM Client | |
Host: 192.168.137.222:5985 | |
> Request: | |
{"Body"=>{"CommandLine"=>{"Command"=>"\"exit 100\""}}, | |
"Header"=> | |
{"Action"=>"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Command", | |
"DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"MaxEnvelopeSize"=>"512000", | |
"MessageID"=>"MessageID3", | |
"OperationID"=>"OperationID2", | |
"OperationTimeout"=>"PT60.000S", | |
"OptionSet"=>{"Option"=>{"WINRS_CONSOLEMODE_STDIN"=>"TRUE"}}, | |
"ReplyTo"=> | |
{"Address"=> | |
"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"SelectorSet"=>{"Selector"=>{"ShellId"=>"ShellId1"}}, | |
"SequenceId"=>"1", | |
"SessionId"=>"SessionId1", | |
"To"=>"http://192.168.137.222:5985/wsman"}} | |
HTTP/1.1 200 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Server: Microsoft-HTTPAPI/2.0 | |
> Response: | |
{"Body"=>{"CommandResponse"=>{"CommandId"=>"CommandId1"}}, | |
"Header"=> | |
{"Action"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandResponse", | |
"MessageID"=>"MessageID4", | |
"OperationID"=>"OperationID2", | |
"RelatesTo"=>"MessageID3", | |
"SequenceId"=>"1", | |
"To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"lang"=>"en-US"} | |
POST /wsman HTTP/1.1 | |
Connection: Keep-Alive | |
Content-Type: application/soap+xml;charset=UTF-8 | |
User-Agent: Microsoft WinRM Client | |
Host: 192.168.137.222:5985 | |
> Request: | |
{"Body"=> | |
{"Receive"=> | |
{"DesiredStream"=>{"CommandId"=>"CommandId1", "content"=>"stdout stderr"}, | |
"SequenceId"=>"0"}}, | |
"Header"=> | |
{"Action"=>"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Receive", | |
"DataLocale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"Locale"=>{"mustUnderstand"=>"false", "lang"=>"en-US"}, | |
"MaxEnvelopeSize"=>"512000", | |
"MessageID"=>"MessageID5", | |
"OperationID"=>"OperationID3", | |
"OperationTimeout"=>"PT60.000S", | |
"ReplyTo"=> | |
{"Address"=> | |
"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"ResourceURI"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd", | |
"SelectorSet"=>{"Selector"=>{"ShellId"=>"ShellId1"}}, | |
"SequenceId"=>"1", | |
"SessionId"=>"SessionId1", | |
"To"=>"http://192.168.137.222:5985/wsman"}} | |
HTTP/1.1 200 | |
Content-Type: application/soap+xml;charset=UTF-8 | |
Server: Microsoft-HTTPAPI/2.0 | |
> Response: | |
{"Body"=> | |
{"ReceiveResponse"=> | |
{"CommandState"=> | |
{"CommandId"=>"CommandId1", | |
"ExitCode"=>"100", | |
"State"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done"}, | |
"Stream"=> | |
[{"CommandId"=>"CommandId1", "End"=>"true", "Name"=>"stdout"}, | |
{"CommandId"=>"CommandId1", "End"=>"true", "Name"=>"stderr"}]}}, | |
"Header"=> | |
{"Action"=> | |
"http://schemas.microsoft.com/wbem/wsman/1/windows/shell/ReceiveResponse", | |
"MessageID"=>"MessageID6", | |
"OperationID"=>"OperationID3", | |
"RelatesTo"=>"MessageID5", | |
"SequenceId"=>"1", | |
"To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}, | |
"lang"=>"en-US"} | |
POST /wsman HTTP/1.1 | |
Connection: Keep-Alive | |
Content-Type: application/soap+xml;charset=UTF-8 | |
User-Agent: Microsoft WinRM Client | |
Host: 192.168.137.222:5985 | |
> Request: | |
{"Body"=>{}, | |
"Header"=> | |
{"Action"=>"http://schemas.microsoft.com/wbem/wsman/1/wsman/End", | |
"MessageID"=>"MessageID7", | |
"OperationID"=>"OperationID3", | |
"ResourceURI"=>"http://schemas.microsoft.com/wbem/wsman/1/wsman/FullDuplex", | |
"To"=>"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"}} | |
HTTP/1.1 204 | |
Server: Microsoft-HTTPAPI/2.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment