mozilla / ssh_scan

DEPRECATED - A prototype SSH configuration and policy scanner (Blog: https://mozilla.github.io/ssh_scan/)
Mozilla Public License 2.0
792 stars 105 forks source link

file flag/function not working #506

Closed gbiagomba closed 4 years ago

gbiagomba commented 4 years ago

Hello,

I am running into some issues witht he -f flag, i keep getting a file not flag despite the file being present in the directory

ssh_scan -f target -o ssh_output.json

Reason: input file supplied is not a file

ssh_scan -f "$PWD/target" -o ssh_output.json

Reason: input file supplied is not a file
claudijd commented 4 years ago

@gbiagomba thanks for reporting, I'm looking into this now

claudijd commented 4 years ago

@gbiagomba I attempted to replicate this in source using the following reproduction steps...

1.) Create a file in $PWD named 'target', add 'ssh.mozilla.com' to said file. 2.) ./bin/ssh_scan -f target

And I get a successful scan result, the same outcome as if I run ./bin/ssh_scan -t ssh.mozilla.com

claudijd commented 4 years ago

I have also confirmed with gem release 0.0.42 behaves in a similar way. I would make sure that target file fully qualified in the gem version though, or you may end up in this situation you proposed above.

claudijd commented 4 years ago

@gbiagomba can you please verify that when you run ssh_scan that 'target' is a valid file and you are specififying a relative path to it?

gbiagomba commented 4 years ago

@claudijd apologies for the tardy reply i was away at a con but I realized I had a typo I should have included an "s" at the end of the file lol. It was a n00b move on my part, sorry about that.