From 8371a268ba8bcfdc04e063f4163640779f410448 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 26 Jan 2022 11:53:06 -0500 Subject: [PATCH] Island: Change the order of log messages on startup to improve UX Some users were confused when the Island started up and thought it had frozen. I hope to alleviate this confusion by changing the order of the log messages. If the last message displayed after initialization gives the user instructions on accessing the island, hopefully users will no longer be confused. PR #1684 --- CHANGELOG.md | 2 ++ monkey/monkey_island/cc/server_setup.py | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0bec1526..df5828bc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/). - "Communicate as Backdoor User" PBA's HTTP requests to request headers only and include a timeout. #1577 - The setup procedure for custom server_config.json files to be simpler. #1576 +- The order and content of Monkey Island's initialization logging to give + clearer instructions to the user and avoid confusion. #1684 ### Removed - The VSFTPD exploiter. #1533 diff --git a/monkey/monkey_island/cc/server_setup.py b/monkey/monkey_island/cc/server_setup.py index a3c0cf750..a99be1a40 100644 --- a/monkey/monkey_island/cc/server_setup.py +++ b/monkey/monkey_island/cc/server_setup.py @@ -167,11 +167,17 @@ def _start_bootloader_server() -> Thread: def _log_init_info(): + MonkeyDownload.log_executable_hashes() + logger.info("Monkey Island Server is running!") logger.info(f"version: {get_version()}") + + _log_web_interface_access_urls() + + +def _log_web_interface_access_urls(): + web_interface_urls = ", ".join([f"https://{ip}:{ISLAND_PORT}" for ip in local_ip_addresses()]) logger.info( - "Listening on the following URLs: {}".format( - ", ".join(["https://{}:{}".format(x, ISLAND_PORT) for x in local_ip_addresses()]) - ) + "To access the web interface, navigate to one of the the following URLs using your " + f"browser: {web_interface_urls}" ) - MonkeyDownload.log_executable_hashes()