diff --git a/README.md b/README.md index d90f1c4..61fec38 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ caster@kali:~$ sara -h Sara supports the following command line options: ```bash -usage: sara.py [-h] [--ip IP] [--username USERNAME] [--password PASSWORD] [--ssh-key SSH_KEY] [--passphrase PASSPHRASE] [--port PORT] +usage: sara.py [-h] [--ip IP] [--username USERNAME] [--password PASSWORD] [--ssh-key SSH_KEY] [--passphrase PASSPHRASE] [--skip-confirmation] [--port PORT] options: -h, --help show this help message and exit @@ -186,6 +186,7 @@ options: --ssh-key SSH_KEY SSH key --passphrase PASSPHRASE SSH key passphrase + --skip-confirmation Skips the confirmation prompt (disclamer: ensure that your are allowed to use this tool) --port PORT SSH port (default: 22) ``` @@ -205,7 +206,11 @@ options: > This only works when using the `--ssh-key` argument. -6. `--port` - allows you to specify a non-standard SSH port for connection. The default is **22**, but if you have changed the SSH port number, it must be specified manually. +6. `--skip-confirmation` skips the confirmation prompt that asks if you are allowed to use this tool on the target system + + > Please do ensure the legality of what you're doing. + +7. `--port` - allows you to specify a non-standard SSH port for connection. The default is **22**, but if you have changed the SSH port number, it must be specified # Sara's Launch diff --git a/sara.py b/sara.py index 53a1c3b..49cbf87 100644 --- a/sara.py +++ b/sara.py @@ -727,6 +727,8 @@ def get_router_uptime(connection): def confirm_legal_usage(): print(" " + "WARNING: This tool is for security auditing of YOUR OWN RouterOS devices.") print(" " + "Unauthorized use may be illegal. Proceed responsibly.\n") + +def prompt_legal_usage(): response = input(" " + "Do you wish to proceed? [yes/no]: ").strip() if response.lower() != "yes": @@ -745,6 +747,7 @@ def main(): parser.add_argument("--password", help="SSH password") parser.add_argument("--ssh-key", help="SSH key") parser.add_argument("--passphrase", help="SSH key passphrase") + parser.add_argument("--skip-confirmation", action='store_true', help='Skips the confirmation prompt (disclamer: ensure that your are allowed to use this tool)') parser.add_argument("--port", type=int, default=22, help="SSH port (default: 22)") args = parser.parse_args() @@ -774,6 +777,8 @@ def main(): confirm_legal_usage() + if not args.skip_confirmation: + prompt_legal_usage() # Start timer start_time = time.time()