Added SSH Key & Fingerprint output to host command#201
Open
drb-ra wants to merge 1 commit intoachillean:masterfrom
Open
Added SSH Key & Fingerprint output to host command#201drb-ra wants to merge 1 commit intoachillean:masterfrom
drb-ra wants to merge 1 commit intoachillean:masterfrom
Conversation
rmhowe425
suggested changes
Jul 11, 2024
|
|
||
| # Show optional ssh info | ||
| if 'ssh' in banner: | ||
| if 'key' in banner['ssh'] and banner['ssh']['key']: |
Contributor
There was a problem hiding this comment.
I feel like this could be simplified like the following: if banner.get('ssh') and banner['ssh'].get('key')
Given that `bannher['ssh']['key'] returns a string, the second part of your nested if statement is not needed. I think the same could be said for your check for banner['ssh']['fingerprint']
Author
There was a problem hiding this comment.
Please feel free to adjust, the idea was more to provide a solution to the request at the same time as the request itself, if there's a better or preferred way to do it, I'm all for that. I think at the time I was just trying to make these changes as close to the original code as possible.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added additional information to the output of the host command for SSH results. SSH Key and Fingerprint are useful for threat hunting and data validation.