Closed darkoperator closed 10 years ago
@darkoperator
Would you tell me what type did you deserialize stream to? If you deserialized stream as Dictionary<String, String>, for example, deserialization will fail because first key is numeric '1'.
Looks like the library I'm using it turning it into a Dictionary :) I will inform the author of it https://github.com/brandonprry/metasploit-sharp/blob/master/metasploit-sharp/MetasploitSession.cs#L110
I see that the methods in unpacking do not include unpacking to a Hashtable so as to keep the key/value structure but offer ILits and String, what would your recommendation be in this case given the structure?
You can use any of following to get raw key/value structures: 1) MessagePackSerializer.Create<Dictionary<MessagePackObject, MessagePackObject>>().Unpack... // returns Dictionary<MessagePackObject, MessagePackObject> 2) Unpacking.UnpackDictionary(...) // returns MessagePackDictionary(IDictionary<MessagePackObject,MessagePackObject>) 3) Unpacking.UnpackObject(...).AsDictionary(); // returns MessagePackDictionary 4) Unpacker.Data.AsDictionary(); // returns MessagePackDictionary
And you can cast MessagePackObject to various primitives.
Does it answer you?
Close because over 1year pasts.
I'm using the library to write a automation module in PowerShell for Metasploit. The command for getting a list of sessions when received gets parsed in Ruby as:
Now when I use msgpack.dll in both C# and PowerShell I get the following exception:
Any clue what the error could be? I even tried it in python and it seemed to work fine with the python library. I compiled msgpack.dll using VS 2012