-
Notifications
You must be signed in to change notification settings - Fork 13.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove SSH scanner using known_hosts #10456
Changes from 5 commits
4450d34
3783347
2e75f46
905f263
09434bd
cd01f11
45e0b53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,11 +43,12 @@ def initialize(info = {}) | |
def run_host(ip) | ||
factory = ssh_socket_factory | ||
ssh_opts = { | ||
port: rport, | ||
auth_methods: ['password', 'keyboard-interactive'], | ||
password: %q{<<< %s(un='%s') = %u}, | ||
proxy: factory, | ||
:non_interactive => true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was one hash that had a mix of the styles There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, yuck. And they're still all symbol keys, so they COULD have used the newer syntax. Oh well. Hashrockets it is! |
||
:port => rport, | ||
:auth_methods => ['password', 'keyboard-interactive'], | ||
:password => %q{<<< %s(un='%s') = %u}, | ||
:proxy => factory, | ||
:non_interactive => true, | ||
:verify_host_key => :never | ||
} | ||
|
||
ssh_opts.merge!(verbose: :debug) if datastore['SSH_DEBUG'] | ||
|
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.
Is there a reason for changing the syntax here? I prefer the newer hash syntax if possible. All these keys are symbols, too.
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.
That said, hashrockets are more consistent with varying key types. I won't complain too much - just asking why it's necessary to change syntax.
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.
Consistency is the only reason. While I also prefer the new syntax, rocket formatted ones are what I’ve been asked for before when building exploit information hashes and was the style of the LoginScanner. As such, while I prefer the newer one, I think consistency is more important than minimal changes. I’m open though to other opinions if we want to use them, but stylistically I think the framework would benefit from a more defined code style guideline around hash structures
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.
Agreed. I ask only because you're modifying my module. :-)
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.
I think hashrockets will be the way to go if we publish our own style guide (and not just cargo-cult the Ruby style guide). We have such wildly varying hashes that it'd make sense to stick to one style.
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.
Python is a little more predictable. :-)