MegaManSec/SSH-Snake

Syntax Error in No-Comments Version

tornupnegatives opened this issue · 2 comments

I am trying to run SSH Snake on my Ubuntu (22.04.1) machine. When I run the Snake.sh script, everything seems to work just fine. However, the no-comments version fails:

➜  ~ bash ./Snake.nocomments.sh
<very beautiful ASCII art>
|-----------------------------------------|------------------------------|
| Setting                                 | Value                        |
|-----------------------------------------|------------------------------|
| ignore_user                             | 0                            |
| use_sudo                                | 1                            |
| ssh_timeout                             | 3                            |
| retry_count                             | 3                            |
| scan_paths                              |                              |
| scan_paths_depth                        | 3                            |
| interesting_users                       | joe root                     |
| interesting_hosts                       | 127.0.0.1                    |
| interesting_dests                       |                              |
| ignored_users                           |                              |
| ignored_hosts                           |                              |
| ignored_dests                           |                              |
| ignored_key_files                       | *badcert.pem* *badkey.pem*   |
| custom_cmds                             |                              |
| use_combinate_interesting_users_hosts   | 1                            |
| use_combinate_users_hosts_aggressive    | 0                            |
| use_find_from_hosts                     | 1                            |
| use_find_from_last                      | 1                            |
| use_find_from_authorized_keys           | 1                            |
| use_find_from_known_hosts               | 1                            |
| use_find_from_ssh_config                | 1                            |
| use_find_from_bash_history              | 1                            |
| use_find_arp_neighbours                 | 1                            |
| use_find_d_block                        | 0                            |
| use_find_from_hashed_known_hosts        | 0                            |
| use_find_from_prev_dest                 | 1                            |
| use_find_from_ignore_list               | 0                            |
| use_retry_all_dests                     | 1                            |
|-----------------------------------------|------------------------------|


[1704474699]bash: line 50: syntax error near unexpected token `}'
[1704474699]bash: line 50: `}'


---------------------------------------

use_retry_all_dests=1. Re-starting.
1 destinations (from 0 unique servers) added to interesting_dests.

---------------------------------------


[1704474699]bash: line 48: syntax error near unexpected token `}'
[1704474699]bash: line 48: `}'



<very beautiful ASCII art>
Unique private keys discovered: 0
Unique shell accounts accessed: 0
Unique systems accessed: 0

Need a list of servers accessed? Run one of these commands:

grep -oE "[a-z_][a-z0-9_-]{0,31}@[0-9\.]*$" output.log  | sort -u
grep -oE "[a-z_][a-z0-9_-]{0,31}@\([0-9\.:]*\)$" output.log  | sort -u
-- https://joshua.hu/ --
-- https://github.com/MegaManSec/SSH-Snake --

Thanks for playing!

Thanks for the report! The issue is that because there are no spaces, the remove_functions() picks up the } in its own function and believes it's the end of the function.

It should be fixed; if it's not, please re-open the issue:)