-
Notifications
You must be signed in to change notification settings - Fork 103
Conversation
@@ -18,6 +21,6 @@ module Constants | |||
"2d63747200000021686d61632d6d64352c686d61632d736861312c686d61632" + | |||
"d726970656d6431363000000021686d61632d6d64352c686d61632d73686131" + | |||
"2c686d61632d726970656d64313630000000046e6f6e65000000046e6f6e650" + | |||
"00000000000000000000000006e05b3b4").unhexify | |||
"00000000000000000000000006e05b3b4").unhexify) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't exactly what I was going for here, although this is a step in the right direction.
You could also achieve the same result with KeyExchangeInit because it's a bindata object class type....
default_key_init = SSHScan::KeyExchangeInit.read("...binary...data...")
What I was striving for on this was to build the object piece by piece attribute by attribute...
default_key_init = SSHScan::KeyExchangeInit.new()
default_key_init.macs = blah
default_key_init.encryption = blah
....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reasoning here was mainly to be more transparent about what we're actually sending so if someone runs into a bug or compatability thing they can tell us something like "... hey I noticed you only include these ciphers, maybe you should add XYZ?" this I think is better.
@claudijd I am trying to print all those properties which we need to set, but it is kind of printing some garbage value so I am not able to get the values of all the properties |
@jinankjain we may need to add some writer functionality to the class so it can be stood up manually. I good place to start would be to do so here in the unit-tests => https://github.com/mozilla/ssh_scan/blob/master/spec/ssh_scan/protocol_spec.rb |
@claudijd We can have some setter function in that class for setting these parameters manually |
@jinankjain yeah, that's the plan. Bindata allows some of this to be set manually by default, but fields like length/etc. may need to be adapted as dynamic fields while building by using lambda functions. |
@jinankjain would you like me to take a swing at this? I have some time now to take a peek. |
@claudijd Yeah I am kind of busy this week with some deadlines. It would be good if you could finish this before me. |
@claudijd How about this one?