Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Fixes #104 #112

Closed
wants to merge 1 commit into from
Closed

Fixes #104 #112

wants to merge 1 commit into from

Conversation

jinankjain
Copy link
Collaborator

@claudijd How about this one?

@@ -18,6 +21,6 @@ module Constants
"2d63747200000021686d61632d6d64352c686d61632d736861312c686d61632" +
"d726970656d6431363000000021686d61632d6d64352c686d61632d73686131" +
"2c686d61632d726970656d64313630000000046e6f6e65000000046e6f6e650" +
"00000000000000000000000006e05b3b4").unhexify
"00000000000000000000000006e05b3b4").unhexify)
Copy link
Contributor

@claudijd claudijd Aug 22, 2016

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
....

Copy link
Contributor

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.

@jinankjain
Copy link
Collaborator Author

@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

@claudijd
Copy link
Contributor

@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

@jinankjain
Copy link
Collaborator Author

@claudijd We can have some setter function in that class for setting these parameters manually

@claudijd
Copy link
Contributor

@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.

@claudijd
Copy link
Contributor

@jinankjain would you like me to take a swing at this? I have some time now to take a peek.

@jinankjain
Copy link
Collaborator Author

jinankjain commented Aug 29, 2016

@claudijd Yeah I am kind of busy this week with some deadlines. It would be good if you could finish this before me.

@jinankjain jinankjain closed this Aug 29, 2016
@jinankjain jinankjain deleted the Bug104 branch August 29, 2016 14:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants