diff --git a/monkey/tests/unit_tests/infection_monkey/exploit/log4shell_utils/test_ldap_server.py b/monkey/tests/unit_tests/infection_monkey/exploit/log4shell_utils/test_ldap_server.py new file mode 100644 index 000000000..99f32eb18 --- /dev/null +++ b/monkey/tests/unit_tests/infection_monkey/exploit/log4shell_utils/test_ldap_server.py @@ -0,0 +1,13 @@ +from pathlib import Path + +from infection_monkey.exploit.log4shell_utils.ldap_server import EXPLOIT_RDN, Tree + + +def test_java_code_base_url(tmp_path): + ip = "172.10.20.30" + port = 9999 + + tree = Tree(ip, port, tmp_path) + ldif_path = Path(tree.path) / f"{EXPLOIT_RDN}.ldif" + with open(ldif_path, "r") as exploit_dit: + assert f"javaCodeBase: http://{ip}:{port}/" in exploit_dit.read()