From 2496ed08896e815637ff72884ba90492d429cd88 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 19 Jul 2021 14:06:31 -0400 Subject: [PATCH] Tests: Use SSHExploiter instead of WmiExploiter in expliot telem tests WmiExploiter relies on impacket. Importing impacket is slow, which has a negative impact on the speed of pytest collection. SSHExploiter is much quicker to import. --- .../infection_monkey/telemetry/test_exploit_telem.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monkey/tests/unit_tests/infection_monkey/telemetry/test_exploit_telem.py b/monkey/tests/unit_tests/infection_monkey/telemetry/test_exploit_telem.py index 95f853922..6ecfeba1a 100644 --- a/monkey/tests/unit_tests/infection_monkey/telemetry/test_exploit_telem.py +++ b/monkey/tests/unit_tests/infection_monkey/telemetry/test_exploit_telem.py @@ -2,7 +2,7 @@ import json import pytest -from infection_monkey.exploit.wmiexec import WmiExploiter +from infection_monkey.exploit.sshexec import SSHExploiter from infection_monkey.model.host import VictimHost from infection_monkey.telemetry.exploit_telem import ExploitTelem @@ -19,10 +19,10 @@ HOST_AS_DICT = { "default_tunnel": None, "default_server": None, } -EXPLOITER = WmiExploiter(HOST) -EXPLOITER_NAME = "WmiExploiter" +EXPLOITER = SSHExploiter(HOST) +EXPLOITER_NAME = "SSHExploiter" EXPLOITER_INFO = { - "display_name": WmiExploiter._EXPLOITED_SERVICE, + "display_name": SSHExploiter._EXPLOITED_SERVICE, "started": "", "finished": "", "vulnerable_urls": [],