jtesta / ssh-audit

SSH server & client security auditing (banner, key exchange, encryption, mac, compression, compatibility, security, etc)
MIT License
3.44k stars 179 forks source link

Argparse - issue #297 #302

Closed oam7575 closed 1 month ago

oam7575 commented 1 month ago

Issue : #297 Implement argparse Remove getopts

Note: Had a few minor issues with argparse failing to cleanly pickup the the target IP / hostname and accepting the multiple -jj As such have also implemented several additional argument switches: IP / Host Related -ip --ip-address --hostname

JSON Related -j -jj --json-indent

There is currently a requirement to to specify -ip / --ip-address / --hostname or --targets "textfile" This can probably be fixed - but I'm not sure how.

jtesta commented 1 month ago

Well thanks for undertaking this project! I very much appreciate the initiative!

I noticed, though, that this PR changes every single line in src/ssh_audit/ssh_audit.py. Might you be able to update it so that only your changed lines are included in the diff? That would make reviewing this PR much, much easier. Thanks!!

oam7575 commented 1 month ago

Hi Joe,

Sorry - that's definitely a mistake. I must have fat fingered something , probably when I rolled back.

I'll see if I can clean this up. The total changes should be ~250 lines at approximately line 850 or so. With a few extra changes for the command line arguments themselves.

If I get stuck cleaning this up, I'll close this request, create a fresh branch apply changes and go from there.

I'll get back to you.

oam7575 commented 1 month ago

Closing - will open a new request that is hopefully cleaner.