From cc6b55d7221020984500f856fc5d189ad28c93fb Mon Sep 17 00:00:00 2001 From: Joshua Rogers Date: Fri, 12 Jan 2024 01:49:06 +0700 Subject: [PATCH] MacOS assumes a new version of Bash from Homebrew. --- README.md | 2 +- Snake.nocomments.sh | 2 +- Snake.sh | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fb4635d..12fd00f 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ SSH-Snake takes a [depth-first approach](https://en.wikipedia.org/wiki/Depth-fir The name SSH-Snake comes from the fact that the output of the script looks like a snake slithering up and down the network. However unlike the game Snake, SSH-Snake will not die when it bites its own tail (connects to a systems it has already scanned or is currently scanning): it will simply print how it connected there as normal, but return and not re-scan the destination (in order to avoid infinite recursion). -SSH-Snake has been tested on various flavors of Linux, and MacOS. If you encounter a Linux-based OS it isn't compatible with, please submit a report. +SSH-Snake has been tested on various flavors of Linux, and MacOS (with Homebrew Bash installed). If you encounter a Linux-based OS it isn't compatible with, please submit a report. # Features diff --git a/Snake.nocomments.sh b/Snake.nocomments.sh index f97cebe..fa358f0 100644 --- a/Snake.nocomments.sh +++ b/Snake.nocomments.sh @@ -1201,7 +1201,7 @@ fi if [[ "$line" == *"Unable to negotiate with"* ]]; then continue fi -if [[ "$line" == "Warning: Identity file"* || "$line" == "Load key"* ]]; then +if [[ "$line" == "Warning: Identity file"* || "$line" == "Load key"* || "$line" == *"No such file or directory"* ]]; then _ignored_key_files["$key_file"]=1 break fi diff --git a/Snake.sh b/Snake.sh index 4feaeda..a81d6de 100755 --- a/Snake.sh +++ b/Snake.sh @@ -2047,9 +2047,10 @@ recursive_scan() { # # Warning: Identity file [file] not accessible: No such file or directory. # Warning: Identity file [file] not accessible: Permission denied. + # no such identity: [file]: No such file or directory # Load key [file]: invalid format # Load key [file]: bad permissions - if [[ "$line" == "Warning: Identity file"* || "$line" == "Load key"* ]]; then + if [[ "$line" == "Warning: Identity file"* || "$line" == "Load key"* || "$line" == *"No such file or directory"* ]]; then _ignored_key_files["$key_file"]=1 break fi